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); } }
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); }
String category = valueChars.subSequence(0, pos).toString(); String id = valueChars.subSequence(pos + 1).toString(); String encoded = getEncodedIdAttribute(category, id, context, markdown, attributeTranslationMap, attributeTranslatedMap); switch (context.getRenderPurpose()) { case TRANSLATION_SPANS:
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); }
String category = valueChars.subSequence(0, pos).toString(); String id = valueChars.subSequence(pos + 1).toString(); String encoded = getEncodedIdAttribute(category, id, context, markdown, attributeTranslationMap, attributeTranslatedMap); switch (context.getRenderPurpose()) { case TRANSLATION_SPANS: