private void render(final SimTocBlock node, final NodeFormatterContext context, MarkdownWriter markdown) { markdown.openPreFormatted(false).append(node.getChars()).closePreFormatted(); }
@Override public void renderDocument(final NodeFormatterContext context, final MarkdownWriter markdown, final Document document, final FormattingPhase phase) { if (phase == FormattingPhase.DOCUMENT_FIRST) { final Node node = document.getFirstChild(); if (node instanceof YamlFrontMatterBlock) { markdown.openPreFormatted(false); markdown.append(node.getChars()).blankLine(); markdown.closePreFormatted(); } } }
@Override public void renderDocument(final NodeFormatterContext context, final MarkdownWriter markdown, final Document document, final FormattingPhase phase) { if (phase == FormattingPhase.DOCUMENT_FIRST) { final Node node = document.getFirstChild(); if (node instanceof JekyllFrontMatterBlock) { markdown.openPreFormatted(false); markdown.append(node.getChars()).blankLine(); markdown.closePreFormatted(); } } }
markdown.closePreFormatted(); markdown.line().append(closingMarker).line(); markdown.tailBlankLine();
private void render(HtmlInnerBlock node, NodeFormatterContext context, MarkdownWriter markdown) { switch (context.getRenderPurpose()) { case TRANSLATION_SPANS: case TRANSLATED_SPANS: markdown.appendNonTranslating(myHtmlBlockPrefix, node.getChars().trimEOL(), ">", node.getChars().trimmedEOL()); break; case TRANSLATED: markdown.openPreFormatted(true); markdown.appendNonTranslating(node.getChars()); markdown.closePreFormatted(); break; case FORMAT: default: markdown.append(node.getChars()); } }
private void render(HtmlBlock node, NodeFormatterContext context, MarkdownWriter markdown) { if (node.hasChildren()) { // inner blocks handle rendering context.renderChildren(node); } else { markdown.blankLine(); // TODO: this really needs to be parsed but we won't do it switch (context.getRenderPurpose()) { case TRANSLATION_SPANS: case TRANSLATED_SPANS: markdown.appendNonTranslating(myHtmlBlockPrefix, node.getChars().trimEOL(), ">", node.getChars().trimmedEOL()); break; case TRANSLATED: markdown.openPreFormatted(true); markdown.appendNonTranslating(node.getChars()); markdown.closePreFormatted(); break; case FORMAT: default: markdown.append(node.getChars()); } markdown.blankLine(); } }
markdown.closePreFormatted(); markdown.popPrefix(); markdown.tailBlankLine();
private void render(final SimTocBlock node, final NodeFormatterContext context, MarkdownWriter markdown) { markdown.openPreFormatted(false).append(node.getChars()).closePreFormatted(); }
@Override public void renderDocument(final NodeFormatterContext context, final MarkdownWriter markdown, final Document document, final FormattingPhase phase) { if (phase == FormattingPhase.DOCUMENT_FIRST) { final Node node = document.getFirstChild(); if (node instanceof JekyllFrontMatterBlock) { markdown.openPreFormatted(false); markdown.append(node.getChars()).blankLine(); markdown.closePreFormatted(); } } }
markdown.closePreFormatted(); markdown.line().append(closingMarker).line(); markdown.tailBlankLine();
private void render(HtmlInnerBlock node, NodeFormatterContext context, MarkdownWriter markdown) { switch (context.getRenderPurpose()) { case TRANSLATION_SPANS: case TRANSLATED_SPANS: markdown.appendNonTranslating(myHtmlBlockPrefix, node.getChars().trimEOL(), ">", node.getChars().trimmedEOL()); break; case TRANSLATED: markdown.openPreFormatted(true); markdown.appendNonTranslating(node.getChars()); markdown.closePreFormatted(); break; case FORMAT: default: markdown.append(node.getChars()); } }
private void render(HtmlBlock node, NodeFormatterContext context, MarkdownWriter markdown) { if (node.hasChildren()) { // inner blocks handle rendering context.renderChildren(node); } else { markdown.blankLine(); // TODO: this really needs to be parsed but we won't do it switch (context.getRenderPurpose()) { case TRANSLATION_SPANS: case TRANSLATED_SPANS: markdown.appendNonTranslating(myHtmlBlockPrefix, node.getChars().trimEOL(), ">", node.getChars().trimmedEOL()); break; case TRANSLATED: markdown.openPreFormatted(true); markdown.appendNonTranslating(node.getChars()); markdown.closePreFormatted(); break; case FORMAT: default: markdown.append(node.getChars()); } markdown.blankLine(); } }
markdown.closePreFormatted(); markdown.popPrefix(); markdown.tailBlankLine();