Package io.micronaut.openapi.adoc.md
Class ToAsciiDocSerializer
java.lang.Object
io.micronaut.openapi.adoc.md.ToAsciiDocSerializer
- All Implemented Interfaces:
org.pegdown.ast.Visitor
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected int
protected int
protected org.pegdown.ast.TableNode
static final String
protected boolean
protected final org.pegdown.LinkRenderer
protected int
protected char
protected org.pegdown.Printer
protected org.pegdown.ast.RootNode
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
cleanAst
(org.pegdown.ast.Node node) Removes superfluous nodes from the tree.protected org.pegdown.ast.Node
findParentNode
(org.pegdown.ast.Node target, org.pegdown.ast.Node from) protected boolean
isFirstChild
(org.pegdown.ast.Node parent, org.pegdown.ast.Node child) protected boolean
isListItemText
(org.pegdown.ast.Node node) protected String
protected String
normalizeWhitelines
(String text) protected String
printChildrenToString
(org.pegdown.ast.SuperNode node) protected void
printImageTag
(org.pegdown.LinkRenderer.Rendering rendering) protected void
printImageTagWithLink
(org.pegdown.LinkRenderer.Rendering image, org.pegdown.LinkRenderer.Rendering link) protected void
printLink
(org.pegdown.LinkRenderer.Rendering rendering) protected void
printNodeSurroundedBy
(org.pegdown.ast.AbstractNode node, String token) protected void
printTextWithQuotesIfNeeded
(org.pegdown.Printer p, String text) protected void
printWithAbbreviations
(String string) void
visit
(org.pegdown.ast.AbbreviationNode node) void
visit
(org.pegdown.ast.AnchorLinkNode node) void
visit
(org.pegdown.ast.AutoLinkNode node) void
visit
(org.pegdown.ast.BlockQuoteNode node) void
visit
(org.pegdown.ast.BulletListNode node) void
visit
(org.pegdown.ast.CodeNode node) void
visit
(org.pegdown.ast.DefinitionListNode node) void
visit
(org.pegdown.ast.DefinitionNode node) void
visit
(org.pegdown.ast.DefinitionTermNode node) void
visit
(org.pegdown.ast.ExpImageNode node) void
visit
(org.pegdown.ast.ExpLinkNode node) void
visit
(org.pegdown.ast.HeaderNode node) void
visit
(org.pegdown.ast.HtmlBlockNode node) void
visit
(org.pegdown.ast.InlineHtmlNode node) void
visit
(org.pegdown.ast.ListItemNode node) void
visit
(org.pegdown.ast.MailLinkNode node) void
visit
(org.pegdown.ast.Node node) void
visit
(org.pegdown.ast.OrderedListNode node) void
visit
(org.pegdown.ast.ParaNode node) void
visit
(org.pegdown.ast.QuotedNode node) void
visit
(org.pegdown.ast.ReferenceNode node) void
visit
(org.pegdown.ast.RefImageNode node) void
visit
(org.pegdown.ast.RefLinkNode node) void
visit
(org.pegdown.ast.RootNode node) void
visit
(org.pegdown.ast.SimpleNode node) void
visit
(org.pegdown.ast.SpecialTextNode node) void
visit
(org.pegdown.ast.StrikeNode node) void
visit
(org.pegdown.ast.StrongEmphSuperNode node) void
visit
(org.pegdown.ast.SuperNode node) void
visit
(org.pegdown.ast.TableBodyNode node) void
visit
(org.pegdown.ast.TableCaptionNode node) void
visit
(org.pegdown.ast.TableCellNode node) void
visit
(org.pegdown.ast.TableColumnNode node) void
visit
(org.pegdown.ast.TableHeaderNode node) void
visit
(org.pegdown.ast.TableNode node) void
visit
(org.pegdown.ast.TableRowNode node) void
visit
(org.pegdown.ast.TextNode node) void
visit
(org.pegdown.ast.VerbatimNode node) void
visit
(org.pegdown.ast.WikiLinkNode node) protected void
visitChildren
(org.pegdown.ast.AbstractNode node)
-
Field Details
-
HARD_LINE_BREAK_MARKDOWN
- See Also:
-
source
-
printer
protected org.pegdown.Printer printer -
references
-
abbreviations
-
linkRenderer
protected final org.pegdown.LinkRenderer linkRenderer -
currentTableNode
protected org.pegdown.ast.TableNode currentTableNode -
currentTableColumn
protected int currentTableColumn -
inTableHeader
protected boolean inTableHeader -
listMarker
protected char listMarker -
listLevel
protected int listLevel -
blockQuoteLevel
protected int blockQuoteLevel -
autoDetectLanguageType
protected boolean autoDetectLanguageType -
rootNode
protected org.pegdown.ast.RootNode rootNode
-
-
Constructor Details
-
ToAsciiDocSerializer
-
-
Method Details
-
toAsciiDoc
-
visit
public void visit(org.pegdown.ast.RootNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.AbbreviationNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.AnchorLinkNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.AutoLinkNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.BlockQuoteNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.BulletListNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.CodeNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.DefinitionListNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.DefinitionTermNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.DefinitionNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.ExpImageNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.ExpLinkNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.HeaderNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.HtmlBlockNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.InlineHtmlNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.ListItemNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.MailLinkNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.OrderedListNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.ParaNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.QuotedNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.ReferenceNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.RefImageNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.RefLinkNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.SimpleNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.StrongEmphSuperNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.StrikeNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.TableBodyNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.TableCaptionNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.TableCellNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.TableColumnNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.TableHeaderNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.TableNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.TableRowNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.VerbatimNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.WikiLinkNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.TextNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.SpecialTextNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.SuperNode node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visit
public void visit(org.pegdown.ast.Node node) - Specified by:
visit
in interfaceorg.pegdown.ast.Visitor
-
visitChildren
protected void visitChildren(org.pegdown.ast.AbstractNode node) -
cleanAst
protected void cleanAst(org.pegdown.ast.Node node) Removes superfluous nodes from the tree.- Parameters:
node
- The node to clean.
-
printNodeSurroundedBy
-
printImageTag
protected void printImageTag(org.pegdown.LinkRenderer.Rendering rendering) -
printImageTagWithLink
protected void printImageTagWithLink(org.pegdown.LinkRenderer.Rendering image, org.pegdown.LinkRenderer.Rendering link) -
printLink
protected void printLink(org.pegdown.LinkRenderer.Rendering rendering) -
printChildrenToString
-
normalize
-
normalizeWhitelines
-
printTextWithQuotesIfNeeded
-
printWithAbbreviations
-
findParentNode
protected org.pegdown.ast.Node findParentNode(org.pegdown.ast.Node target, org.pegdown.ast.Node from) -
isFirstChild
protected boolean isFirstChild(org.pegdown.ast.Node parent, org.pegdown.ast.Node child) -
isListItemText
protected boolean isListItemText(org.pegdown.ast.Node node)
-