Refine search
public FootnoteOptions(DataHolder options) { this.footnoteRefPrefix = FootnoteExtension.FOOTNOTE_REF_PREFIX.getFrom(options); this.footnoteRefSuffix = FootnoteExtension.FOOTNOTE_REF_SUFFIX.getFrom(options); this.footnoteBackRefString = FootnoteExtension.FOOTNOTE_BACK_REF_STRING.getFrom(options); this.footnoteLinkRefClass = FootnoteExtension.FOOTNOTE_LINK_REF_CLASS.getFrom(options); this.footnoteBackLinkRefClass = FootnoteExtension.FOOTNOTE_BACK_LINK_REF_CLASS.getFrom(options); this.contentIndent = Parser.LISTS_ITEM_INDENT.getFrom(options); } }
@Override public <T> T get(DataKey<T> key) { if (dataSet.containsKey(key)) { return key.getValue(dataSet.get(key)); } else { return key.getDefaultValue(this); } }
public CoreNodeRenderer(DataHolder options) { referenceRepository = options.get(Parser.REFERENCES); recheckUndefinedReferences = HtmlRenderer.RECHECK_UNDEFINED_REFERENCES.getFrom(options); listOptions = ListOptions.getFrom(options); obfuscateEmail = HtmlRenderer.OBFUSCATE_EMAIL.getFrom(options); obfuscateEmailRandom = HtmlRenderer.OBFUSCATE_EMAIL_RANDOM.getFrom(options); codeContentBlock = Parser.FENCED_CODE_CONTENT_BLOCK.getFrom(options); codeSoftLineBreaks = Parser.CODE_SOFT_LINE_BREAKS.getFrom(options); myLines = null; myEOLs = null; myNextLine = 0; nextLineStartOffset = 0; }
@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(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 static final DataKey<KeepType> ZZZZZZS_KEEP = new DataKey<>("ZZZZZZS_KEEP", KeepType.FIRST); //zzzoptionszzz(CUSTOM_NODE_REPOSITORY) standard option to allow control over how to handle duplicates public static final DataKey<ZzzzzzRepository> ZZZZZZS = new DataKey<>("ZZZZZZS", new DataValueFactory<ZzzzzzRepository>() {@Override public ZzzzzzRepository create(DataHolder options) { return new ZzzzzzRepository(options); }}); //zzzoptionszzz(CUSTOM_NODE_REPOSITORY) public static final DataKey<Boolean> ZZZZZZ_OPTION1 = new DataKey<>("ZZZZZZ_OPTION1", false); //zzzoptionszzz(CUSTOM_PROPERTIES) public static final DataKey<String> ZZZZZZ_OPTION2 = new DataKey<>("ZZZZZZ_OPTION2", "default"); //zzzoptionszzz(CUSTOM_PROPERTIES) public static final DataKey<Integer> ZZZZZZ_OPTION3 = new DataKey<>("ZZZZZZ_OPTION3", Integer.MAX_VALUE); //zzzoptionszzz(CUSTOM_PROPERTIES) public static final DataKey<String> LOCAL_ONLY_TARGET_CLASS = new DataKey<>("LOCAL_ONLY_TARGET_CLASS", "local-only");//zzzoptionszzz(LINK_RESOLVER, ATTRIBUTE_PROVIDER) public static final DataKey<String> MISSING_TARGET_CLASS = new DataKey<>("MISSING_TARGET_CLASS", "absent");//zzzoptionszzz(LINK_RESOLVER, ATTRIBUTE_PROVIDER) public static final LinkStatus LOCAL_ONLY = new LinkStatus("LOCAL_ONLY");
public GitLabNodeRenderer(DataHolder options) { this.options = new GitLabOptions(options); this.codeContentBlock = Parser.FENCED_CODE_CONTENT_BLOCK.getFrom(options); this.referenceRepository = options.get(Parser.REFERENCES); this.recheckUndefinedReferences = HtmlRenderer.RECHECK_UNDEFINED_REFERENCES.getFrom(options); }
@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; }
public SpecExampleOptions(DataHolder options) { this.renderHtml = SpecExampleExtension.SPEC_EXAMPLE_RENDER_RAW_HTML.getFrom(options); this.renderAs = SpecExampleExtension.SPEC_EXAMPLE_RENDER_AS.getFrom(options); this.exampleBreak = SpecExampleExtension.SPEC_EXAMPLE_BREAK.getFrom(options); this.typeBreak = SpecExampleExtension.SPEC_TYPE_BREAK.getFrom(options); this.optionNodes = SpecExampleExtension.SPEC_OPTION_NODES.getFrom(options); this.renderedHtmlPrefix = SpecExampleExtension.SPEC_EXAMPLE_RENDERED_HTML_PREFIX.getFrom(options); this.renderedHtmlSuffix = SpecExampleExtension.SPEC_EXAMPLE_RENDERED_HTML_SUFFIX.getFrom(options); } }
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) { 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 <T> T get(DataKey<T> key) { if (dataSet.containsKey(key)) { return key.getValue(dataSet.get(key)); } else { return key.getDefaultValue(this); } }
public InlineParserOptions(DataHolder options) { matchLookaheadFirst = Parser.MATCH_NESTED_LINK_REFS_FIRST.getFrom(options); parseMultiLineImageUrls = Parser.PARSE_MULTI_LINE_IMAGE_URLS.getFrom(options); hardLineBreakLimit = Parser.HARD_LINE_BREAK_LIMIT.getFrom(options); spaceInLinkUrls = Parser.SPACE_IN_LINK_URLS.getFrom(options); spaceInLinkElements = Parser.SPACE_IN_LINK_ELEMENTS.getFrom(options); codeSoftLineBreaks = Parser.CODE_SOFT_LINE_BREAKS.getFrom(options); inlineDelimiterDirectionalPunctuations = Parser.INLINE_DELIMITER_DIRECTIONAL_PUNCTUATIONS.getFrom(options); linksAllowMatchedParentheses = Parser.LINKS_ALLOW_MATCHED_PARENTHESES.getFrom(options); } }
@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; }
@Override public void renderDocument(final NodeRendererContext context, final HtmlWriter html, final Document document, final RenderingPhase phase) { if (phase == BODY_TOP) { enumeratedOrdinals = EnumeratedReferenceExtension.ENUMERATED_REFERENCE_ORDINALS.getFrom(document); } }
@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 StrikethroughNodeRenderer(DataHolder options) { strikethroughStyleHtmlOpen = StrikethroughSubscriptExtension.STRIKETHROUGH_STYLE_HTML_OPEN.getFrom(options); strikethroughStyleHtmlClose = StrikethroughSubscriptExtension.STRIKETHROUGH_STYLE_HTML_CLOSE.getFrom(options); subscriptStyleHtmlOpen = StrikethroughSubscriptExtension.SUBSCRIPT_STYLE_HTML_OPEN.getFrom(options); subscriptStyleHtmlClose = StrikethroughSubscriptExtension.SUBSCRIPT_STYLE_HTML_CLOSE.getFrom(options); }