private void renderList(ListBlock node, NodeRendererContext context, HtmlWriter html) { context.renderChildren(node); if (node.getParent() instanceof Document) { if (node.getLastChild() == null || listOptions.isTightListItem((ListItem) node.getLastChild())) { html.blankLine(); } } }
private void renderList(ListBlock node, NodeRendererContext context, HtmlWriter html) { context.renderChildren(node); if (node.getParent() instanceof Document) { if (node.getLastChild() == null || listOptions.isTightListItem((ListItem) node.getLastChild())) { html.blankLine(); } } }
public boolean isInTightListItem(Paragraph node) { Block parent = node.getParent(); if (!(parent instanceof ListItem)) return false; ListItem listItem = (ListItem) parent; if (!listItem.isItemParagraph(node)) return false; boolean autoLoose = isAutoLoose(); if (autoLoose && isAutoLooseOneLevelLists()) { return isTightListItem(listItem); } return !autoLoose && listItem.isParagraphInTightListItem(node) || autoLoose && listItem.isInTightList(); }
private void renderListItem(ListItem node, NodeRendererContext context, HtmlWriter html) { renderListItemPrefix(node, context, html); if (listOptions.isTightListItem(node)) { context.renderChildren(node); } else { context.renderChildren(node); if (node.getFirstChild().getNext() != null) { html.blankLine(); } } }
private void renderListItem(ListItem node, NodeRendererContext context, HtmlWriter html) { renderListItemPrefix(node, context, html); if (listOptions.isTightListItem(node)) { context.renderChildren(node); } else { context.renderChildren(node); if (node.getFirstChild().getNext() != null) { html.blankLine(); } } }
void render(final TaskListItem node, final NodeRendererContext context, final HtmlWriter html) { final BasedSequence sourceText = context.getHtmlOptions().sourcePositionParagraphLines || node.getFirstChild() == null ? node.getChars() : node.getFirstChild().getChars(); final String itemDoneStatusClass = node.isItemDoneMarker() ? itemDoneClass : itemNotDoneClass; if (listOptions.isTightListItem(node)) { if (!tightItemClass.isEmpty()) html.attr("class", tightItemClass); if (!itemDoneStatusClass.isEmpty() && !itemDoneStatusClass.equals(tightItemClass)) html.attr("class", itemDoneStatusClass);
private void renderListItem(final ListItem node, final NodeRendererContext context, final HtmlWriter html) { if (listOptions.isTightListItem(node)) { html.srcPosWithEOL(node.getChars()).withAttr(TIGHT_LIST_ITEM).withCondIndent().tagLine("li", new Runnable() { @Override public void run() { html.text(node.getMarkerSuffix().unescape()); context.renderChildren(node); } }); } else { html.srcPosWithEOL(node.getChars()).withAttr(LOOSE_LIST_ITEM).tagIndent("li", new Runnable() { @Override public void run() { html.text(node.getMarkerSuffix().unescape()); context.renderChildren(node); } }); } }
private void render(final DefinitionItem node, final NodeRendererContext context, final HtmlWriter html) { if (listOptions.isTightListItem(node)) { html.srcPosWithEOL(node.getChars()).withAttr(CoreNodeRenderer.TIGHT_LIST_ITEM).withCondIndent().tagLine("dd", new Runnable() { @Override public void run() { html.text(node.getMarkerSuffix().unescape()); context.renderChildren(node); } }); } else { html.srcPosWithEOL(node.getChars()).withAttr(CoreNodeRenderer.LOOSE_LIST_ITEM).tagIndent("dd", new Runnable() { @Override public void run() { html.text(node.getMarkerSuffix().unescape()); context.renderChildren(node); } }); } //html.srcPosWithEOL(node.getChars()).withAttr().withCondIndent().tagLine("dd", new Runnable() { // @Override // public void run() { // context.renderChildren(node); // } //}); }
private void renderListItem(final ListItem node, final DocxRendererContext docx) { final int nesting = node.countDirectAncestorsOfType(ListItem.class, BulletList.class, OrderedList.class); final DocxRendererOptions options = docx.getDocxRendererOptions(); final String listTextStyle = listOptions.isTightListItem(node) ? options.TIGHT_PARAGRAPH_STYLE : options.LOOSE_PARAGRAPH_STYLE;
private void renderList(ListBlock node, NodeRendererContext context, HtmlWriter html) { context.renderChildren(node); if (node.getParent() instanceof Document) { if (node.getLastChild() == null || listOptions.isTightListItem((ListItem) node.getLastChild())) { html.blankLine(); } } }
public boolean isInTightListItem(Paragraph node) { Block parent = node.getParent(); if (!(parent instanceof ListItem)) return false; ListItem listItem = (ListItem) parent; if (!listItem.isItemParagraph(node)) return false; boolean autoLoose = isAutoLoose(); if (autoLoose && isAutoLooseOneLevelLists()) { return isTightListItem(listItem); } return !autoLoose && listItem.isParagraphInTightListItem(node) || autoLoose && listItem.isInTightList(); }
private void renderListItem(ListItem node, NodeRendererContext context, HtmlWriter html) { renderListItemPrefix(node, context, html); if (listOptions.isTightListItem(node)) { context.renderChildren(node); } else { context.renderChildren(node); if (node.getFirstChild().getNext() != null) { html.blankLine(); } } }
void render(final TaskListItem node, final NodeRendererContext context, final HtmlWriter html) { final BasedSequence sourceText = context.getHtmlOptions().sourcePositionParagraphLines || node.getFirstChild() == null ? node.getChars() : node.getFirstChild().getChars(); final String itemDoneStatusClass = node.isItemDoneMarker() ? itemDoneClass : itemNotDoneClass; if (listOptions.isTightListItem(node)) { if (!tightItemClass.isEmpty()) html.attr("class", tightItemClass); if (!itemDoneStatusClass.isEmpty() && !itemDoneStatusClass.equals(tightItemClass)) html.attr("class", itemDoneStatusClass);
private void renderListItem(final ListItem node, final NodeRendererContext context, final HtmlWriter html) { if (listOptions.isTightListItem(node)) { html.srcPosWithEOL(node.getChars()).withAttr(TIGHT_LIST_ITEM).withCondIndent().tagLine("li", new Runnable() { @Override public void run() { html.text(node.getMarkerSuffix().unescape()); context.renderChildren(node); } }); } else { html.srcPosWithEOL(node.getChars()).withAttr(LOOSE_LIST_ITEM).tagIndent("li", new Runnable() { @Override public void run() { html.text(node.getMarkerSuffix().unescape()); context.renderChildren(node); } }); } }
private void render(final DefinitionItem node, final NodeRendererContext context, final HtmlWriter html) { if (listOptions.isTightListItem(node)) { html.srcPosWithEOL(node.getChars()).withAttr(CoreNodeRenderer.TIGHT_LIST_ITEM).withCondIndent().tagLine("dd", new Runnable() { @Override public void run() { html.text(node.getMarkerSuffix().unescape()); context.renderChildren(node); } }); } else { html.srcPosWithEOL(node.getChars()).withAttr(CoreNodeRenderer.LOOSE_LIST_ITEM).tagIndent("dd", new Runnable() { @Override public void run() { html.text(node.getMarkerSuffix().unescape()); context.renderChildren(node); } }); } //html.srcPosWithEOL(node.getChars()).withAttr().withCondIndent().tagLine("dd", new Runnable() { // @Override // public void run() { // context.renderChildren(node); // } //}); }