Refine search
private BlockFactory(DataHolder options) { super(options); myHtmlCommentBlocksInterruptParagraph = Parser.HTML_COMMENT_BLOCKS_INTERRUPT_PARAGRAPH.getFrom(options); this.myHtmlBlockDeepParser = options.get(Parser.HTML_BLOCK_DEEP_PARSER); this.myHtmlBlockDeepParseNonBlock = options.get(Parser.HTML_BLOCK_DEEP_PARSE_NON_BLOCK); this.myHtmlBlockDeepParseFirstOpenTagOnOneLine = options.get(Parser.HTML_BLOCK_DEEP_PARSE_FIRST_OPEN_TAG_ON_ONE_LINE); this.myHtmlBlockCommentOnlyFullLine = options.get(Parser.HTML_BLOCK_COMMENT_ONLY_FULL_LINE); this.myHtmlBlockStartOnlyOnBlockTags = options.get(Parser.HTML_BLOCK_START_ONLY_ON_BLOCK_TAGS); }
@Override public boolean transferReferences(final MutableDataHolder document, final DataHolder included) { // cannot optimize based on macros in this document, repository is not accessed until rendering if (/*document.contains(MACRO_DEFINITIONS) &&*/ included.contains(MACRO_DEFINITIONS)) { return Parser.transferReferences(MACRO_DEFINITIONS.getFrom(document), MACRO_DEFINITIONS.getFrom(included), MACRO_DEFINITIONS_KEEP.getFrom(document) == KeepType.FIRST); } return false; }
public FencedCodeBlockParser(DataHolder options, char fenceChar, int fenceLength, int fenceIndent, int fenceMarkerIndent) { this.fenceChar = fenceChar; this.fenceLength = fenceLength; this.fenceIndent = fenceIndent; this.fenceMarkerIndent = fenceIndent + fenceMarkerIndent; this.matchingCloser = options.get(Parser.MATCH_CLOSING_FENCE_CHARACTERS); this.codeContentBlock = options.get(Parser.FENCED_CODE_CONTENT_BLOCK); }
@Override public boolean transferReferences(Document document, Document included) { // transfer references from included to document boolean transferred = false; if (options.contains(EXTENSIONS)) { for (Extension extension : options.get(EXTENSIONS)) { if (extension instanceof ReferenceHoldingExtension) { ReferenceHoldingExtension parserExtension = (ReferenceHoldingExtension) extension; if (parserExtension.transferReferences(document, included)) transferred = true; } } } // transfer references if (document.contains(REFERENCES) && included.contains(REFERENCES)) { if (transferReferences(REFERENCES.getFrom(document), REFERENCES.getFrom(included), REFERENCES_KEEP.getFrom(document) == KeepType.FIRST)) { transferred = true; } } if (transferred) { document.set(HtmlRenderer.RECHECK_UNDEFINED_REFERENCES, true); } return transferred; }
@Override public boolean contains(DataKey key) { return super.contains(key) || (parent != null && parent.contains(key)); }
@Override public Collection<DataKey> keySet() { if (parent != null) { ArrayList<DataKey> all = new ArrayList<DataKey>(); all.addAll(super.keySet()); for (DataKey key : parent.keySet()) { if (!contains(key)) { all.add(key); } } return all; } else { return super.keySet(); } }
Extensions.ALL & ~( Extensions.HARDWRAPS | Extensions.ANCHORLINKS ) ).toMutable(); ArrayList<Extension> extensions = new ArrayList<Extension>(); for ( Extension extension : flexmarkOptions.get( com.vladsch.flexmark.parser.Parser.EXTENSIONS ) )
@Override public boolean transferReferences(Document document, Document included) { // transfer references from included to document boolean transferred = false; if (options.contains(EXTENSIONS)) { for (Extension extension : options.get(EXTENSIONS)) { if (extension instanceof ReferenceHoldingExtension) { ReferenceHoldingExtension parserExtension = (ReferenceHoldingExtension) extension; if (parserExtension.transferReferences(document, included)) transferred = true; } } } // transfer references if (document.contains(REFERENCES) && included.contains(REFERENCES)) { if (transferReferences(REFERENCES.getFrom(document), REFERENCES.getFrom(included), REFERENCES_KEEP.getFrom(document) == KeepType.FIRST)) { transferred = true; } } if (transferred) { document.set(HtmlRenderer.RECHECK_UNDEFINED_REFERENCES, true); } return transferred; }
public TocNodeRenderer(DataHolder options) { this.haveTitle = options != null && options.contains(TocExtension.TITLE); this.options = new TocOptions(options, false); }
@Override public Collection<DataKey> keySet() { if (parent != null) { ArrayList<DataKey> all = new ArrayList<DataKey>(); all.addAll(super.keySet()); for (DataKey key : parent.keySet()) { if (!contains(key)) { all.add(key); } } return all; } else { return super.keySet(); } }
MutableDataHolder flexmarkOptions = PegdownOptionsAdapter.flexmarkOptions(options).toMutable(); ArrayList<Extension> extensions = new ArrayList<Extension>(); for (Extension extension : flexmarkOptions.get(Parser.EXTENSIONS)) {
@Override public ReferenceRepository getRepository(final DataHolder options) { return options.get(Parser.REFERENCES); }
@Override public boolean transferReferences(final MutableDataHolder document, final DataHolder included) { if (document.contains(ENUMERATED_REFERENCES) && included.contains(ENUMERATED_REFERENCES)) { return Parser.transferReferences(ENUMERATED_REFERENCES.getFrom(document), ENUMERATED_REFERENCES.getFrom(included), ENUMERATED_REFERENCES_KEEP.getFrom(document) == KeepType.FIRST); } return false; }
@Override public Map<DataKey, Object> getAll() { if (parent != null) { HashMap<DataKey, Object> all = new HashMap<DataKey, Object>(); all.putAll(super.getAll()); for (DataKey key : parent.keySet()) { if (!contains(key)) { all.put(key, parent.get(key)); } } return all; } else { return super.getAll(); } }