Class Printer.Pretty

java.lang.Object
org.jsoup.nodes.Printer
org.jsoup.nodes.Printer.Pretty
All Implemented Interfaces:
NodeVisitor
Direct Known Subclasses:
Printer.Outline
Enclosing class:
Printer

static class Printer.Pretty extends Printer
Pretty Printer
  • Field Details

    • preserveWhitespace

      boolean preserveWhitespace
    • maxScan

      private static final int maxScan
      See Also:
  • Constructor Details

  • Method Details

    • addHead

      void addHead(Element el, int depth)
      Overrides:
      addHead in class Printer
    • addTail

      void addTail(Element el, int depth)
      Overrides:
      addTail in class Printer
    • addNode

      void addNode(LeafNode node, int depth)
      Overrides:
      addNode in class Printer
    • addText

      void addText(TextNode node, int textOptions, int depth)
      Overrides:
      addText in class Printer
    • textTrim

      int textTrim(TextNode node, int options)
    • shouldIndent

      boolean shouldIndent(Node node)
    • isBlockEl

      boolean isBlockEl(Node node)
    • hasChildBlocks

      static boolean hasChildBlocks(Element el)
      Returns true if any of the Element's child nodes should indent. Checks the last 5 nodes only (to minimize scans).
    • hasNonTextNodes

      static boolean hasNonTextNodes(Element el)
    • previousNonblank

      static Node previousNonblank(Node node)
    • nextNonBlank

      static Node nextNonBlank(Node node)
    • isBlankText

      static boolean isBlankText(Node node)
    • tagIs

      static boolean tagIs(int option, Node node)