@Override public NodePostProcessor create(Document document) { return new AttributesNodePostProcessor(document); } }
@Override public NodeRenderer create(final DataHolder options) { return new AttributesNodeRenderer(options); } }
@Override public void render(AttributesDelimiter node, NodeFormatterContext context, MarkdownWriter markdown) { AttributesNodeFormatter.this.render(node, context, markdown); } }));
private static void renderReferenceText(BasedSequence text, NodeFormatterContext context, MarkdownWriter markdown) { if (!text.isEmpty()) { BasedSequence valueChars = text; int pos = valueChars.indexOf(':'); String category; String id = null; if (pos == -1) { category = text.toString(); } else { category = valueChars.subSequence(0, pos).toString(); id = valueChars.subSequence(pos + 1).toString(); } String encoded = AttributesNodeFormatter.getEncodedIdAttribute(category, id, context, markdown); markdown.append(encoded); } }
@Override public void extend(Parser.Builder parserBuilder) { parserBuilder.postProcessorFactory(new AttributesNodePostProcessor.Factory()); parserBuilder.customInlineParserExtensionFactory(new AttributesInlineParserExtension.Factory()); }
@Override public void extend(final HtmlRenderer.Builder rendererBuilder, final String rendererType) { if (ASSIGN_TEXT_ATTRIBUTES.getFrom(rendererBuilder)) { rendererBuilder.nodeRendererFactory(new AttributesNodeRenderer.Factory()); } rendererBuilder.attributeProviderFactory(new AttributesAttributeProvider.Factory()); }
Node attributeOwner = getAttributeOwner(state, attributesNode); if (attributeOwner != null) { nodeAttributeRepository.put(attributeOwner, attributesNode);
public AttributesNodeRenderer(DataHolder options) { myOptions = new AttributesOptions(options); }
@Override public AttributeProvider create(LinkResolverContext context) { return new AttributesAttributeProvider(context); } }
@Override public NodeFormatter create(final DataHolder options) { return new AttributesNodeFormatter(options); } }
@Override public InlineParserExtension create(final InlineParser inlineParser) { return new AttributesInlineParserExtension(inlineParser); }
public Factory() { super(false); addNodes(AttributesNode.class); }
@Override public NodeAttributeRepository create(DataHolder options) { return new NodeAttributeRepository(options); } });
@Override public void extend(final RendererBuilder rendererBuilder, final String rendererType) { //rendererBuilder.nodeRendererFactory(new AttributesNodeRenderer.Factory()); rendererBuilder.attributeProviderFactory(new AttributesAttributeProvider.Factory()); } }
@Override public void extend(final Formatter.Builder builder) { builder.nodeFormatterFactory(new AttributesNodeFormatter.Factory()); }
public AttributesInlineParserExtension(final InlineParser inlineParser) { this.parsing = new AttributeParsing(inlineParser.getParsing()); }
TextBase textBase = new TextBase(); textBaseWrap(state, lastNonAttributesNode, lastNode, textBase); lastNonAttributesNode = textBase; } else { textBaseWrap(state, lastNonAttributesNode, attributesNode, textBase); previous = textBase; } else {
public static String getEncodedIdAttribute(String category, String categoryId, NodeFormatterContext context, MarkdownWriter markdown) { Map<String, String> attributeTranslationMap = context.getTranslationStore().get(ATTRIBUTE_TRANSLATION_MAP); Map<String, String> attributeTranslatedMap = context.getTranslationStore().get(ATTRIBUTE_TRANSLATED_MAP); return getEncodedIdAttribute(category, categoryId, context, markdown, attributeTranslationMap, attributeTranslatedMap); }
@Override public void render(AttributesNode node, NodeFormatterContext context, MarkdownWriter markdown) { AttributesNodeFormatter.this.render(node, context, markdown); } }));
public AttributesNodePostProcessor(Document document) { nodeAttributeRepository = AttributesExtension.NODE_ATTRIBUTES.getFrom(document); myOptions = new AttributesOptions(document); }