/** * @return a new empty list item. * @since 1.8RC2 */ private ListItemBlock createEmptyTocEntry() { return new ListItemBlock(Collections.emptyList()); }
/** * {@inheritDoc} * * @see org.xwiki.rendering.listener.Listener#endListItem() */ public void endListItem() { this.stack.push(new ListItemBlock(generateListFromStack())); }
public void endListItem() { // Note: This means we support Paragraphs inside lists. this.stack.push(new ListItemBlock(generateListFromStack())); }
/** * Create a new toc list item based on section title. * * @param headerBlock the {@link HeaderBlock}. * @return the new list item block. */ private ListItemBlock createTocEntry(HeaderBlock headerBlock, String documentReference) { // Create the link to target the header anchor DocumentResourceReference reference = new DocumentResourceReference(documentReference); reference.setAnchor(headerBlock.getId()); LinkBlock linkBlock = new LinkBlock(this.tocBlockFilter.generateLabel(headerBlock), reference, false); return new ListItemBlock(Collections.singletonList(linkBlock)); }
result.setParameter(ID_ATTRIBUTE_NAME, FOOTNOTE_ID_PREFIX + counter); result.setParameter(CLASS_ATTRIBUTE_NAME, "footnoteBackRef"); result = new ListItemBlock(Collections.singletonList(result)); result.addChild(new SpaceBlock()); result.addChildren(parsedContent);