@Override public void closeBlock(ParserState state) { // set the enumeratedReference from closingMarker to end block.setCharsFromContent(); block.setEnumeratedReference(block.getChars().subSequence(block.getClosingMarker().getEndOffset() - block.getChars().getStartOffset()).trimStart()); content = null; // add block to reference repository final EnumeratedReferenceRepository enumeratedReferences = EnumeratedReferenceExtension.ENUMERATED_REFERENCES.getFrom(state.getProperties()); enumeratedReferences.put(block.getText().toString(), block); }
markdown.append(line.trimStart()); i++;
@Override public void closeBlock(ParserState state) { // set the footnote from closingMarker to end block.setCharsFromContent(); block.setFootnote(block.getChars().subSequence(block.getClosingMarker().getEndOffset() - block.getChars().getStartOffset()).trimStart()); // add it to the map FootnoteRepository footnoteMap = state.getProperties().get(FootnoteExtension.FOOTNOTES); footnoteMap.put(footnoteMap.normalizeKey(block.getText()), block); content = null; }
state.nodeRemoved(tmp); } else { next.setChars(next.getChars().trimStart());
if (firstChild != null) firstChild.setChars(firstChild.getChars().trim()); } else { if (firstChild != null) firstChild.setChars(firstChild.getChars().trimStart()); if (lastChild != null) lastChild.setChars(lastChild.getChars().trimEnd());
markdown.append(line.trimStart()); i++;
markdown.append(line.trimStart()); i++;
@Override public void closeBlock(ParserState state) { // set the footnote from closingMarker to end block.setCharsFromContent(); block.setFootnote(block.getChars().subSequence(block.getClosingMarker().getEndOffset() - block.getChars().getStartOffset()).trimStart()); // add it to the map FootnoteRepository footnoteMap = state.getProperties().get(FootnoteExtension.FOOTNOTES); footnoteMap.put(footnoteMap.normalizeKey(block.getText()), block); content = null; }
state.nodeRemoved(tmp); } else { next.setChars(next.getChars().trimStart());
if (firstChild != null) firstChild.setChars(firstChild.getChars().trim()); } else { if (firstChild != null) firstChild.setChars(firstChild.getChars().trimStart()); if (lastChild != null) lastChild.setChars(lastChild.getChars().trimEnd());
markdown.append(line.trimStart()); i++;