Class PrettyPrinter

    • Method Detail

      • setStripQuotes

        public void setStripQuotes​(boolean stripQuotes)
        Whether to strip quotes from certain values. This facilitates tests that want to compare trees.
      • setPreserveComments

        public PrettyPrinter setPreserveComments​(boolean preserve)
        Whether comments in the CSS nodes are preserved in the pretty printed output.

        Note: Comments layout is not guaranteed, since detailed position information in the input files is not preserved by the parser. Line breaks are added after every comment with current identation as best effort.

      • getPrettyPrintedString

        public java.lang.String getPrettyPrintedString()
      • createVisitor

        protected CssTreeVisitor createVisitor​(VisitController visitController,
                                               CodeBuffer codeBuffer)
        Description copied from class: CodePrinter
        Constructs the visitor required by the subclass. This visitor's enter* methods will be called after the source map generator's startSourceMapping method and before its endSourceMapping method.
        Specified by:
        createVisitor in class CodePrinter