HTML Tidy  5.9.15
The HTACG Tidy HTML Project
pprint.h File Reference

Detailed Description

Pretty Print the parse tree.

Pretty printer for HTML and XML documents.

  • Block-level and unknown elements are printed on new lines and their contents indented with a user configured amount of spaces/tabs.
  • Inline elements are printed inline.
  • Inline content is wrapped on spaces (except in attribute values or preformatted text, after start tags and before end tags.
Author
HTACG, et al (consult git log)
All Rights Reserved.
See tidy.h for the complete license.
Date
Additional updates: consult git log

Go to the source code of this file.

Data Structures

struct  TidyIndent
 A record of the state of a single line, capturing the indent level, in-attribute, and in-string state of a line. More...
 
struct  TidyPrintImpl
 The pretty-printing buffer. More...
 

Enumerations

enum  PrettyPrintMode {
  NORMAL = 0u ,
  PREFORMATTED = 1u ,
  COMMENT = 2u ,
  ATTRIBVALUE = 4u ,
  NOWRAP = 8u ,
  CDATA = 16u
}
 This typedef represents the current pretty-printing mode, and instructs the printer behavior per the content currently being output. More...
 

Functions

TY_PRIVATE void TY_❪FreePrintBuf❫ (TidyDocImpl *doc)
 Deallocates and free a Tidy document's pretty-printing buffer. More...
 
TY_PRIVATE void TY_❪InitPrintBuf❫ (TidyDocImpl *doc)
 Allocates and initializes the pretty-printing buffer for a Tidy document. More...
 
TY_PRIVATE void TY_❪PFlushLine❫ (TidyDocImpl *doc, uint indent)
 Flushes the current buffer to the actual output sink. More...
 
TY_PRIVATE void TY_❪PPrintTree❫ (TidyDocImpl *doc, uint mode, uint indent, Node *node)
 Print the HTML document tree for the given document using the given node as the root of the document. More...
 
TY_PRIVATE void TY_❪PPrintXMLTree❫ (TidyDocImpl *doc, uint mode, uint indent, Node *node)
 Print the XML document tree for the given document using the given node as the root of the document. More...
 
TY_PRIVATE void TY_❪PrintBody❫ (TidyDocImpl *doc)
 Print just the content of the HTML body element, which is useful when want to reuse material from other documents. More...