@SuppressWarnings("MethodMayBeStatic") void render(HtmlInnerBlockComment node, NodeRendererContext context, HtmlWriter html) { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlCommentBlocks, context.getHtmlOptions().escapeHtmlCommentBlocks, false); }
@SuppressWarnings("MethodMayBeStatic") void render(HtmlInline node, NodeRendererContext context, HtmlWriter html) { //if (context.getHtmlOptions().sourceWrapInlineHtml) { // html.srcPos(node.getChars()).withAttr(AttributablePart.NODE_POSITION).tag("span"); //} renderInlineHtml(node, context, html, context.getHtmlOptions().suppressInlineHtml, context.getHtmlOptions().escapeInlineHtml); //if (context.getHtmlOptions().sourceWrapInlineHtml) { // html.tag("/span"); //} }
public static boolean isSuppressedLinkPrefix(final CharSequence url, NodeRendererContext context) { Pattern suppressedLinks = context.getHtmlOptions().suppressedLinks; if (suppressedLinks != null) { Matcher matcher = suppressedLinks.matcher(url); return matcher.matches(); } return false; }
private void render(HtmlCommentBlock node, NodeRendererContext context, HtmlWriter html) { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlCommentBlocks, context.getHtmlOptions().escapeHtmlCommentBlocks); }
private void render(HtmlInline node, NodeRendererContext context, HtmlWriter html) { renderInlineHtml(node, context, html, context.getHtmlOptions().suppressInlineHtml, context.getHtmlOptions().escapeInlineHtml); }
private void render(HtmlInnerBlock node, NodeRendererContext context, HtmlWriter html) { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlBlocks, context.getHtmlOptions().escapeHtmlBlocks); }
@SuppressWarnings("MethodMayBeStatic") void render(HtmlInlineComment node, NodeRendererContext context, HtmlWriter html) { renderInlineHtml(node, context, html, context.getHtmlOptions().suppressInlineHtmlComments, context.getHtmlOptions().escapeInlineHtmlComments); }
private void render(HtmlInnerBlock node, NodeRendererContext context, HtmlWriter html) { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlBlocks, context.getHtmlOptions().escapeHtmlBlocks); }
@SuppressWarnings("MethodMayBeStatic") void render(HtmlCommentBlock node, NodeRendererContext context, HtmlWriter html) { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlCommentBlocks, context.getHtmlOptions().escapeHtmlCommentBlocks, false); }
@SuppressWarnings("MethodMayBeStatic") void render(HtmlInnerBlock node, NodeRendererContext context, HtmlWriter html) { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlBlocks, context.getHtmlOptions().escapeHtmlBlocks, false); }
public HtmlWriter srcPos(int startOffset, int endOffset) { if (startOffset <= endOffset && !context.getHtmlOptions().sourcePositionAttribute.isEmpty()) { super.attr(context.getHtmlOptions().sourcePositionAttribute, startOffset + "-" + endOffset); } return this; }
private void render(HtmlInnerBlockComment node, NodeRendererContext context, HtmlWriter html) { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlCommentBlocks, context.getHtmlOptions().escapeHtmlCommentBlocks); }
void render(HardLineBreak node, NodeRendererContext context, HtmlWriter html) { if (context.getHtmlOptions().sourcePositionParagraphLines) { if (renderLineBreak(context.getHtmlOptions().hardBreak, null, node, context, html)) { return; } } html.raw(context.getHtmlOptions().hardBreak); }
void render(SoftLineBreak node, NodeRendererContext context, HtmlWriter html) { final String softBreak = context.getHtmlOptions().softBreak; if (context.getHtmlOptions().sourcePositionParagraphLines) { if (renderLineBreak(softBreak, softBreak.equals("\n") || softBreak.equals("\r\n") || softBreak.equals("\r") ? "code" : null, node, context, html)) { return; } } html.raw(softBreak); }
private void render(HtmlBlock node, NodeRendererContext context, HtmlWriter html) { if (node.hasChildren()) { // inner blocks handle rendering context.renderChildren(node); } else { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlBlocks, context.getHtmlOptions().escapeHtmlBlocks); } }
private void render(HtmlBlock node, NodeRendererContext context, HtmlWriter html) { if (node.hasChildren()) { // inner blocks handle rendering context.renderChildren(node); } else { renderHtmlBlock(node, context, html, context.getHtmlOptions().suppressHtmlBlocks, context.getHtmlOptions().escapeHtmlBlocks); } }
private void renderTocHeaders(NodeRendererContext context, HtmlWriter html, Node node, List<Heading> headings, TocOptions options) { List<Heading> filteredHeadings = TocUtils.filteredHeadings(headings, options); final Paired<List<Heading>, List<String>> paired = TocUtils.htmlHeadingTexts(context, filteredHeadings, options); TocUtils.renderHtmlToc(html, context.getHtmlOptions().sourcePositionAttribute.isEmpty() ? BasedSequence.NULL : node.getChars(), paired.getFirst(), paired.getSecond(), options); }
private void renderTocHeaders(NodeRendererContext context, HtmlWriter html, Node node, List<Heading> headings, TocOptions options) { List<Heading> filteredHeadings = TocUtils.filteredHeadings(headings, options); final Paired<List<Heading>, List<String>> paired = TocUtils.htmlHeadingTexts(context, filteredHeadings, options); TocUtils.renderHtmlToc(html, context.getHtmlOptions().sourcePositionAttribute.isEmpty() ? BasedSequence.NULL : node.getChars(), paired.getFirst(), paired.getSecond(), options); }
@SuppressWarnings("MethodMayBeStatic") void render(HtmlEntity node, NodeRendererContext context, HtmlWriter html) { if (context.getHtmlOptions().unescapeHtmlEntities) { html.text(node.getChars().unescape()); } else { html.raw(node.getChars().unescapeNoEntities()); } }
private void renderLooseParagraph(final Paragraph node, final NodeRendererContext context, final HtmlWriter html) { if (context.getHtmlOptions().noPTagsUseBr) { renderTextBlockParagraphLines(node, context, html, false); html.tagVoid("br").tagVoid("br").line(); } else { html.srcPosWithEOL(node.getChars()).withAttr().tagLine("p", new Runnable() { @Override public void run() { renderTextBlockParagraphLines(node, context, html, false); } }); } }