@Override public String create(final DataHolder options) { if (options != null && options.contains(EmojiExtension.ROOT_IMAGE_PATH)) { return options.get(EmojiExtension.ROOT_IMAGE_PATH); } // kludge it to use our resources return EMOJI_RESOURCE_PREFIX; } });
@Override public boolean contains(DataKey key) { return super.contains(key) || (parent != null && parent.contains(key)); }
public TocNodeRenderer(DataHolder options) { this.haveTitle = options != null && options.contains(TocExtension.TITLE); this.options = new TocOptions(options, false); }
@Override public boolean contains(DataKey key) { return super.contains(key) || (parent != null && parent.contains(key)); }
public Builder(DataHolder options) { super(options); if (options.contains(Parser.EXTENSIONS)) { extensions(get(Parser.EXTENSIONS)); } }
public Builder(DataHolder options) { super(options); if (options.contains(Parser.EXTENSIONS)) { extensions(get(Parser.EXTENSIONS)); } }
public Builder(DataHolder options) { super(options); if (options.contains(Parser.EXTENSIONS)) { extensions(get(Parser.EXTENSIONS)); } }
@Override public <T> T get(DataKey<T> key) { if (parent == null || super.contains(key) || !parent.contains(key)) { return super.get(key); } else { return parent.get(key); } } }
@Override public <T> T get(DataKey<T> key) { if (parent == null || super.contains(key) || !parent.contains(key)) { return super.get(key); } else { return parent.get(key); } } }
@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; }
@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 boolean transferReferences(final MutableDataHolder document, final DataHolder included) { if (document.contains(ZZZZZZS) && included.contains(ZZZZZZS)) { return Parser.transferReferences(ZZZZZZS.getFrom(document), ZZZZZZS.getFrom(included), ZZZZZZS_KEEP.getFrom(document) == KeepType.FIRST); } return false; }
@Override public boolean transferReferences(final MutableDataHolder document, final DataHolder included) { if (document.contains(FOOTNOTES) && included.contains(FOOTNOTES)) { return Parser.transferReferences(FOOTNOTES.getFrom(document), FOOTNOTES.getFrom(included), FOOTNOTES_KEEP.getFrom(document) == KeepType.FIRST); } return false; }
public Parser withOptions(DataHolder options) { return options == null ? this : (options.contains(EXTENSIONS) ? new Parser(new Builder(options)) : new Parser(new Builder(builder, options))); }
@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 Builder(DataHolder options) { super(options); if (options.contains(Parser.EXTENSIONS)) { extensions(get(Parser.EXTENSIONS)); } }
public Builder(DataHolder options) { super(options); if (options.contains(Parser.EXTENSIONS)) { extensions(get(Parser.EXTENSIONS)); } }
@Override public <T> T get(DataKey<T> key) { if (parent == null || super.contains(key) || !parent.contains(key)) { return super.get(key); } else { return parent.get(key); } } }
@Override public <T> T get(DataKey<T> key) { if (parent == null || super.contains(key) || !parent.contains(key)) { return super.get(key); } else { return parent.get(key); } } }
@Override public boolean transferReferences(final MutableDataHolder document, final DataHolder included) { if (document.contains(FOOTNOTES) && included.contains(FOOTNOTES)) { return Parser.transferReferences(FOOTNOTES.getFrom(document), FOOTNOTES.getFrom(included), FOOTNOTES_KEEP.getFrom(document) == KeepType.FIRST); } return false; }