module watt.markdown.phase2

Perform inline translation (headings, links, etc) on partially parsed Markdown.

Code Map

//! Perform inline translation (headings, links, etc) on partially parsed
//! Markdown.
module watt.markdown.phase2;


//! Perform inline transformation.
class Phase2 : Visitor
{
public:
	this(links: LinkReference[string]) { }
	fn processEmphasis(children: Node[], stackBottom: DelimiterEntry) { }
	fn insert(parent: Parent, start: Text, payload: Node[], outputList: Node[]) { }
	fn replaceRange(parent: Parent, start: Text, end: Text, payload: Node[], outputList: Node[]) { }
	fn replaceNode(start: Text, node: Node, outputList: Node[]) { }
	fn doDelimiters(text: Text, replacement: Node[]) bool { }
	fn doDelimiters(children: Node[], sink: scope (Sink)) { }
	fn getLabel(src: Source) string { }
	fn getInlineReference(src: Source) LinkReference { }
	fn eatIfTag(src: Source, tag: string) bool { }
	fn eatRun(src: Source, run: string) bool { }
	fn enter(n: Document, sink: scope (Sink)) { }
	fn leave(n: Document, sink: scope (Sink)) { }
	fn enter(n: BlockQuote, sink: scope (Sink)) { }
	fn leave(n: BlockQuote, sink: scope (Sink)) { }
	fn enter(n: List, sink: scope (Sink)) { }
	fn leave(n: List, sink: scope (Sink)) { }
	fn enter(n: Item, sink: scope (Sink)) { }
	fn leave(n: Item, sink: scope (Sink)) { }
	fn enter(n: Paragraph, sink: scope (Sink)) { }
	fn leave(n: Paragraph, sink: scope (Sink)) { }
	fn enter(n: Heading, sink: scope (Sink)) { }
	fn leave(n: Heading, sink: scope (Sink)) { }
	fn enter(n: Emph, sink: scope (Sink)) { }
	fn leave(n: Emph, sink: scope (Sink)) { }
	fn enter(n: Link, sink: scope (Sink)) { }
	fn leave(n: Link, sink: scope (Sink)) { }
	fn enter(n: Image, sink: scope (Sink)) { }
	fn leave(n: Image, sink: scope (Sink)) { }
	fn enter(n: Strong, sink: scope (Sink)) { }
	fn leave(n: Strong, sink: scope (Sink)) { }
	fn visit(n: HtmlBlock, sink: scope (Sink)) { }
	fn visit(n: CodeBlock, sink: scope (Sink)) { }
	fn visit(n: ThematicBreak, sink: scope (Sink)) { }
	fn visit(n: Text, sink: scope (Sink)) { }
	fn visit(n: Softbreak, sink: scope (Sink)) { }
	fn visit(n: Linebreak, sink: scope (Sink)) { }
	fn visit(code: Code, sink: scope (Sink)) { }
	fn visit(n: HtmlInline, sink: scope (Sink)) { }
}
class Phase2 : Visitor

Perform inline transformation.

fn doDelimiters(text: Text, replacement: Node[]) bool

Return

True if replacement should be inserted. * This function does all the heavy lifting of the inline code. * Basically, if the parsing phase doesn't do it, it's probably done here. *