| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| protected BitSet | |
| protected Map | |
| protected ArrayList | |
| protected final BitSet | |
| protected final Map | |
| protected List | |
| protected Map | |
| private Bracket | lastBracket
Top opening bracket ( |
| protected Delimiter | lastDelimiter
Top delimiter (emphasis, strong emphasis or custom emphasis). |
| protected LinkDestinationParser | |
| protected List | |
| protected final LinkRefProcessorData | |
| protected final BitSet | |
| protected ReferenceRepository | referenceRepository
Link references by ID, needs to be built up using parseReference before calling parse. |
| protected BitSet |
| Access | Constructor and Description |
|---|---|
| public | InlineParserImpl(DataHolder options, BitSet specialCharacters, BitSet delimiterCharacters, Map<Character, DelimiterProcessor> delimiterProcessors, LinkRefProcessorData linkRefProcessorsData, List<InlineParserExtensionFactory> inlineParserExtensionFactories)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static void | addDelimiterProcessorForChar(char delimiterChar, DelimiterProcessor toAdd, Map<Character, DelimiterProcessor> delimiterProcessors)
|
| private static void | addDelimiterProcessors(List<? extends DelimiterProcessor> delimiterProcessors, Map<Character, DelimiterProcessor> map)
|
| public static BitSet | |
| public static Map | |
| pack-priv static Map | calculateInlineParserExtensions(DataHolder options, List<InlineParserExtensionFactory> extensionFactories)
|
| public static LinkRefProcessorData | |
| public static BitSet | |
| protected Object | |
| protected static void | collapseLinkRefChildren(Node node, Function<LinkRefDerived, Boolean> isTentative, boolean trimFirstLastChild)
|
| protected static boolean | |
| protected static boolean | |
| public void | |
| public Bracket | |
| public Delimiter | |
| public void | |
| private InlineParserImpl. | |
| public void | |
| public void | |
| public void | parse(@NotNull BasedSequence content, @NotNull Node block)
Parse content in block into inline children, using reference map to resolve references. |
| public boolean | Returns: true if processed characters false otherwiseImplements com. Attempt to parse an autolink (URL or email in pointy brackets). |
| protected boolean | Returns: trueParse a backslash-escaped special character, adding either the escaped character, a hard line break (if the backslash is followed by a newline), or a literal backslash to the block's children. |
| protected boolean | Returns: true if matched backticks, false otherwiseAttempt to parse backticks, adding either a backtick code span or a literal sequence of backticks. |
| protected boolean | |
| protected boolean | Returns: trueTry to match close bracket against an opening in the delimiter stack. |
| public @Nullable List | parseCustom(@NotNull BasedSequence input, @NotNull Node node, @NotNull BitSet customCharacters, @NotNull Map<Character, CharacterNodeFactory> nodeFactoryMap)
|
| protected boolean | Returns: true if processed characters false otherwisedelimiter processor instance delimiterProcessor, char delimiter character being processed delimiterChar)Attempt to parse delimiters like emphasis, strong emphasis or custom delimiters. |
| public boolean | Returns: true if processed characters false otherwiseImplements com. Attempt to parse an entity, return Entity object if successful. |
| public boolean | Returns: true if processed characters false otherwiseImplements com. Attempt to parse inline HTML. |
| protected boolean | Returns: false on failure true on successParse the next inline element in subject, advancing input index. |
| protected boolean | |
| public BasedSequence | Returns: the string or null if no match.Implements com. Attempt to parse link destination, |
| public int | Returns: number of characters parsed.Implements com. Attempt to parse a link label |
| public BasedSequence | Returns: the string or null if no match.Implements com. Attempt to parse link title (sans quotes), |
| public boolean | Returns: trueImplements com. Parse a newline. |
| protected boolean | Returns: trueAdd open bracket to delimiter stack and add a text node to block's children. |
| protected int | Returns: number of characters were parsed as a reference from the start of the sequence,0 if nonethe block whose text is being parsed for references block, BasedSequence sequence of the blocks characters s)Attempt to parse a reference definition, modifying the internal reference map. |
| protected boolean | Returns: true if processed characters false otherwiseParse a run of ordinary characters, or a single character with a special meaning in markdown, as a plain string. |
| public int | preProcessBlock(Paragraph
paragraph node to process block, ParserState parser state state)Implements com. Process Paragraph Content on closing of the paragraph block to removeIndex non-text lines. |
| private boolean | |
| public void | |
| public void | |
| public void | removeDelimiterAndNode(@NotNull Delimiter
delimiter to remove delim)Remove the delimiter and the corresponding text node. |
| public void | removeDelimiterKeepNode(@NotNull Delimiter
delimiter being processed delim)Remove the delimiter but keep the corresponding node as text. |
| public void | |
| private void | |
| protected InlineParserImpl. | Returns: information about delimiter run, ornulldelimiter processor instance delimiterProcessor, char delimiter character being scanned delimiterChar)Scan a sequence of characters with code delimiterChar, and return information about the number of delimiters and whether they are positioned such that they can open and/or close emphasis or strong emphasis. |
| customCharacters | back to summary |
|---|---|
| protected BitSet customCharacters | |
| customSpecialCharacterFactoryMap | back to summary |
|---|---|
| protected Map<Character, CharacterNodeFactory> customSpecialCharacterFactoryMap | |
| customSpecialCharacterNodes | back to summary |
|---|---|
| protected ArrayList<Node> customSpecialCharacterNodes | |
| delimiterCharacters | back to summary |
|---|---|
| protected final BitSet delimiterCharacters | |
| delimiterProcessors | back to summary |
|---|---|
| protected final Map<Character, DelimiterProcessor> delimiterProcessors | |
| inlineParserExtensionFactories | back to summary |
|---|---|
| protected List<InlineParserExtensionFactory> inlineParserExtensionFactories | |
| inlineParserExtensions | back to summary |
|---|---|
| protected Map<Character, List<InlineParserExtension>> inlineParserExtensions | |
| lastBracket | back to summary |
|---|---|
| private Bracket lastBracket Top opening bracket ( | |
| lastDelimiter | back to summary |
|---|---|
| protected Delimiter lastDelimiter Top delimiter (emphasis, strong emphasis or custom emphasis). (Brackets are on a separate stack, different from the algorithm described in the spec.) | |
| linkDestinationParser | back to summary |
|---|---|
| protected LinkDestinationParser linkDestinationParser | |
| linkRefProcessors | back to summary |
|---|---|
| protected List<LinkRefProcessor> linkRefProcessors | |
| linkRefProcessorsData | back to summary |
|---|---|
| protected final LinkRefProcessorData linkRefProcessorsData | |
| originalSpecialCharacters | back to summary |
|---|---|
| protected final BitSet originalSpecialCharacters | |
| referenceRepository | back to summary |
|---|---|
| protected ReferenceRepository referenceRepository Link references by ID, needs to be built up using parseReference before calling parse. | |
| specialCharacters | back to summary |
|---|---|
| protected BitSet specialCharacters | |
| InlineParserImpl | back to summary |
|---|---|
| public InlineParserImpl(DataHolder options, BitSet specialCharacters, BitSet delimiterCharacters, Map<Character, DelimiterProcessor> delimiterProcessors, LinkRefProcessorData linkRefProcessorsData, List<InlineParserExtensionFactory> inlineParserExtensionFactories) | |
| addBracket | back to summary |
|---|---|
| private void addBracket(Bracket bracket) | |
| addDelimiterProcessorForChar | back to summary |
|---|---|
| private static void addDelimiterProcessorForChar(char delimiterChar, DelimiterProcessor toAdd, Map<Character, DelimiterProcessor> delimiterProcessors) | |
| addDelimiterProcessors | back to summary |
|---|---|
| private static void addDelimiterProcessors(List<? extends DelimiterProcessor> delimiterProcessors, Map<Character, DelimiterProcessor> map) | |
| calculateDelimiterCharacters | back to summary |
|---|---|
| public static BitSet calculateDelimiterCharacters(DataHolder options, Set<Character> characters) | |
| calculateDelimiterProcessors | back to summary |
|---|---|
| public static Map | |
| calculateInlineParserExtensions | back to summary |
|---|---|
| pack-priv static Map | |
| calculateLinkRefProcessors | back to summary |
|---|---|
| public static LinkRefProcessorData calculateLinkRefProcessors(DataHolder options, List<LinkRefProcessorFactory> linkRefProcessors) | |
| calculateSpecialCharacters | back to summary |
|---|---|
| public static BitSet calculateSpecialCharacters(DataHolder options, BitSet delimiterCharacters) | |
| clone | back to summary |
|---|---|
| protected Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| collapseLinkRefChildren | back to summary |
|---|---|
| protected static void collapseLinkRefChildren(Node node, Function<LinkRefDerived, Boolean> isTentative, boolean trimFirstLastChild) | |
| containsLinkRefs | back to summary |
|---|---|
| protected static boolean containsLinkRefs(Node node, Boolean isTentative) | |
| containsLinkRefs | back to summary |
|---|---|
| protected static boolean containsLinkRefs(BasedSequence nodeChars, Node next, Boolean isTentative) | |
| finalizeDocument | back to summary |
|---|---|
public void finalizeDocument(@NotNull Document document)
| |
| getLastBracket | back to summary |
|---|---|
| public Bracket getLastBracket() Implements com.
| |
| getLastDelimiter | back to summary |
|---|---|
| public Delimiter getLastDelimiter() Implements com.
| |
| initializeDocument | back to summary |
|---|---|
public void initializeDocument(@NotNull Document document)
| |
| matchLinkRef | back to summary |
|---|---|
| private InlineParserImpl. | |
| mergeIfNeeded | back to summary |
|---|---|
public void mergeIfNeeded(Text first, Text last)
| |
| mergeTextNodes | back to summary |
|---|---|
public void mergeTextNodes(@Nullable Node fromNode, @Nullable Node toNode)
| |
| parse | back to summary |
|---|---|
| public void parse(@NotNull BasedSequence content, @NotNull Node block) Parse content in block into inline children, using reference map to resolve references.
| |
| parseAutolink | back to summary |
|---|---|
| public boolean parseAutolink() Implements com. Attempt to parse an autolink (URL or email in pointy brackets).
| |
| parseBackslash | back to summary |
|---|---|
| protected boolean parseBackslash() Parse a backslash-escaped special character, adding either the escaped character, a hard line break (if the backslash is followed by a newline), or a literal backslash to the block's children.
| |
| parseBackticks | back to summary |
|---|---|
| protected boolean parseBackticks() Attempt to parse backticks, adding either a backtick code span or a literal sequence of backticks.
| |
| parseBang | back to summary |
|---|---|
| protected boolean parseBang() If next character is [, and ! delimiter to delimiter stack and add a text node to block's children. Otherwise just add a text node.
| |
| parseCloseBracket | back to summary |
|---|---|
| protected boolean parseCloseBracket() Try to match close bracket against an opening in the delimiter stack. Add either a link or image, or a plain [ character, to block's children. If there is a matching delimiter, removeIndex it from the delimiter stack. Also handles custom link ref processing
| |
| parseCustom | back to summary |
|---|---|
| public @Nullable List | |
| parseDelimiters | back to summary |
|---|---|
| protected boolean parseDelimiters(DelimiterProcessor delimiterProcessor, char delimiterChar) Attempt to parse delimiters like emphasis, strong emphasis or custom delimiters.
| |
| parseEntity | back to summary |
|---|---|
| public boolean parseEntity() Implements com. Attempt to parse an entity, return Entity object if successful.
| |
| parseHtmlInline | back to summary |
|---|---|
| public boolean parseHtmlInline() Implements com. Attempt to parse inline HTML.
| |
| parseInline | back to summary |
|---|---|
| protected boolean parseInline() Parse the next inline element in subject, advancing input index. On success, add the result to block's children and return true. On failure, return false.
| |
| parseInline | back to summary |
|---|---|
| protected boolean parseInline(boolean customOnly) | |
| parseLinkDestination | back to summary |
|---|---|
| public BasedSequence parseLinkDestination() Implements com. Attempt to parse link destination,
| |
| parseLinkLabel | back to summary |
|---|---|
| public int parseLinkLabel() Implements com. Attempt to parse a link label
| |
| parseLinkTitle | back to summary |
|---|---|
| public BasedSequence parseLinkTitle() Implements com. Attempt to parse link title (sans quotes),
| |
| parseNewline | back to summary |
|---|---|
| public boolean parseNewline() Implements com. Parse a newline. If it was preceded by two spaces, append a hard line break; otherwise a soft line break.
| |
| parseOpenBracket | back to summary |
|---|---|
| protected boolean parseOpenBracket() Add open bracket to delimiter stack and add a text node to block's children.
| |
| parseReference | back to summary |
|---|---|
| protected int parseReference(Block block, BasedSequence s) Attempt to parse a reference definition, modifying the internal reference map.
| |
| parseString | back to summary |
|---|---|
| protected boolean parseString() Parse a run of ordinary characters, or a single character with a special meaning in markdown, as a plain string.
| |
| preProcessBlock | back to summary |
|---|---|
| public int preProcessBlock(Paragraph block, ParserState state) Implements com. Doc from com. Process Paragraph Content on closing of the paragraph block to removeIndex non-text lines. This is used by extensions to take leading lines from a paragraph and convert them to other blocks by Default leading lines that define references are removed and Reference nodes are inserted before.
| |
| processCustomCharacters | back to summary |
|---|---|
| private boolean processCustomCharacters() | |
| processDelimiters | back to summary |
|---|---|
public void processDelimiters(Delimiter stackBottom)
| |
| removeDelimiter | back to summary |
|---|---|
public void removeDelimiter(@NotNull Delimiter delim)
| |
| removeDelimiterAndNode | back to summary |
|---|---|
| public void removeDelimiterAndNode(@NotNull Delimiter delim) Remove the delimiter and the corresponding text node. For used delimiters, e.g. `*` in `*foo*`. | |
| removeDelimiterKeepNode | back to summary |
|---|---|
| public void removeDelimiterKeepNode(@NotNull Delimiter delim) Remove the delimiter but keep the corresponding node as text. For unused delimiters such as `_` in `foo_bar`. | |
| removeDelimitersBetween | back to summary |
|---|---|
public void removeDelimitersBetween(@NotNull Delimiter opener, @NotNull Delimiter closer)
| |
| removeLastBracket | back to summary |
|---|---|
| private void removeLastBracket() | |
| scanDelimiters | back to summary |
|---|---|
| protected InlineParserImpl. Scan a sequence of characters with code delimiterChar, and return information about the number of delimiters and whether they are positioned such that they can open and/or close emphasis or strong emphasis.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| canClose | back to summary |
|---|---|
| pack-priv final boolean canClose | |
| canOpen | back to summary |
|---|---|
| pack-priv final boolean canOpen | |
| count | back to summary |
|---|---|
| pack-priv final int count | |
| DelimiterData | back to summary |
|---|---|
| pack-priv DelimiterData(int count, boolean canOpen, boolean canClose) | |
| Modifier and Type | Field and Description |
|---|---|
| public final BasedSequence | |
| public final LinkRefProcessor | |
| public final boolean |
| Access | Constructor and Description |
|---|---|
| public | ReferenceProcessorMatch(LinkRefProcessor processor, boolean wantExclamation, BasedSequence nodeChars)
|
| nodeChars | back to summary |
|---|---|
| public final BasedSequence nodeChars | |
| processor | back to summary |
|---|---|
| public final LinkRefProcessor processor | |
| wantExclamation | back to summary |
|---|---|
| public final boolean wantExclamation | |
| ReferenceProcessorMatch | back to summary |
|---|---|
| public ReferenceProcessorMatch(LinkRefProcessor processor, boolean wantExclamation, BasedSequence nodeChars) | |