| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final InlineParserContext | |
| private final Map | |
| private boolean | |
| private final Map | |
| private Bracket | lastBracket
Top opening bracket ( |
| private Delimiter | lastDelimiter
Top delimiter (emphasis, strong emphasis or custom emphasis). |
| private Scanner | |
| private final BitSet | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static void | addDelimiterProcessorForChar(char delimiterChar, DelimiterProcessor toAdd, Map<Character, DelimiterProcessor> delimiterProcessors)
|
| private static void | addDelimiterProcessors(Iterable<DelimiterProcessor> delimiterProcessors, Map<Character, DelimiterProcessor> map)
|
| public static Map | |
| public static BitSet | |
| private void | |
| private void | |
| private void | |
| public void | parse(SourceLines lines, Node block)
Implements jdk. Parse content in block into inline children, appending them to the block node. |
| private Node | |
| private Node | |
| private List | parseDelimiters(DelimiterProcessor delimiterProcessor, char delimiterChar)
Attempt to parse delimiters like emphasis, strong emphasis or custom delimiters. |
| private List | |
| private Node | |
| private String | parseLinkDestination(Scanner scanner)
Attempt to parse link destination, returning the string or null if no match. |
| pack-priv String | parseLinkLabel(Scanner scanner)
Attempt to parse a link label, returning the label between the brackets or null. |
| private String | parseLinkTitle(Scanner scanner)
Attempt to parse link title (sans quotes), returning the string or null if no match. |
| private Node | |
| private Node | parseText()
Parse the next character as plain text, and possibly more if the following characters are non-special. |
| private void | |
| private void | |
| private void | |
| private void | removeDelimiterKeepNode(Delimiter delim)
Remove the delimiter but keep the corresponding node as text. |
| private void | |
| private void | |
| pack-priv void | |
| private InlineParserImpl. | Returns: information about delimiter run, ornullScan 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. |
| public Scanner | scanner()
Implements jdk. Return a scanner for the input for the current position (on the character that the inline parser registered interest for). |
| private Text |
| context | back to summary |
|---|---|
| private final InlineParserContext context | |
| delimiterProcessors | back to summary |
|---|---|
| private final Map<Character, DelimiterProcessor> delimiterProcessors | |
| includeSourceSpans | back to summary |
|---|---|
| private boolean includeSourceSpans | |
| inlineParsers | back to summary |
|---|---|
| private final Map<Character, List<InlineContentParser>> inlineParsers | |
| lastBracket | back to summary |
|---|---|
| private Bracket lastBracket Top opening bracket ( | |
| lastDelimiter | back to summary |
|---|---|
| private Delimiter lastDelimiter Top delimiter (emphasis, strong emphasis or custom emphasis). (Brackets are on a separate stack, different from the algorithm described in the spec.) | |
| scanner | back to summary |
|---|---|
| private Scanner scanner | |
| specialCharacters | back to summary |
|---|---|
| private final BitSet specialCharacters | |
| trailingSpaces | back to summary |
|---|---|
| private int trailingSpaces | |
| InlineParserImpl | back to summary |
|---|---|
| public InlineParserImpl(InlineParserContext inlineParserContext) | |
| 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(Iterable<DelimiterProcessor> delimiterProcessors, Map<Character, DelimiterProcessor> map) | |
| calculateDelimiterProcessors | back to summary |
|---|---|
| public static Map | |
| calculateSpecialCharacters | back to summary |
|---|---|
| public static BitSet calculateSpecialCharacters(Set<Character> delimiterCharacters, Set<Character> characters) | |
| mergeChildTextNodes | back to summary |
|---|---|
| private void mergeChildTextNodes(Node node) | |
| mergeIfNeeded | back to summary |
|---|---|
| private void mergeIfNeeded(Text first, Text last, int textLength) | |
| mergeTextNodesInclusive | back to summary |
|---|---|
| private void mergeTextNodesInclusive(Node fromNode, Node toNode) | |
| parse | back to summary |
|---|---|
| public void parse(SourceLines lines, Node block) Implements jdk. Parse content in block into inline children, appending them to the block node.
| |
| parseBang | back to summary |
|---|---|
| private Node 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 |
|---|---|
| private Node parseCloseBracket() Try to match close bracket against an opening in the delimiter stack. Return either a link or image, or a plain [ character. If there is a matching delimiter, remove it from the delimiter stack. | |
| parseDelimiters | back to summary |
|---|---|
| private List Attempt to parse delimiters like emphasis, strong emphasis or custom delimiters. | |
| parseInline | back to summary |
|---|---|
| private List Parse the next inline element in subject, advancing our position. On success, return the new inline node. On failure, return null. | |
| parseLineBreak | back to summary |
|---|---|
| private Node parseLineBreak() | |
| parseLinkDestination | back to summary |
|---|---|
| private String parseLinkDestination(Scanner scanner) Attempt to parse link destination, returning the string or null if no match. | |
| parseLinkLabel | back to summary |
|---|---|
| pack-priv String parseLinkLabel(Scanner scanner) Attempt to parse a link label, returning the label between the brackets or null. | |
| parseLinkTitle | back to summary |
|---|---|
| private String parseLinkTitle(Scanner scanner) Attempt to parse link title (sans quotes), returning the string or null if no match. | |
| parseOpenBracket | back to summary |
|---|---|
| private Node parseOpenBracket() Add open bracket to delimiter stack and add a text node to block's children. | |
| parseText | back to summary |
|---|---|
| private Node parseText() Parse the next character as plain text, and possibly more if the following characters are non-special. | |
| processDelimiters | back to summary |
|---|---|
| private void processDelimiters(Delimiter stackBottom) | |
| removeDelimiter | back to summary |
|---|---|
| private void removeDelimiter(Delimiter delim) | |
| removeDelimiterAndNodes | back to summary |
|---|---|
| private void removeDelimiterAndNodes(Delimiter delim) Remove the delimiter and the corresponding text node. For used delimiters, e.g. `*` in `*foo*`. | |
| removeDelimiterKeepNode | back to summary |
|---|---|
| private void removeDelimiterKeepNode(Delimiter delim) Remove the delimiter but keep the corresponding node as text. For unused delimiters such as `_` in `foo_bar`. | |
| removeDelimitersBetween | back to summary |
|---|---|
| private void removeDelimitersBetween(Delimiter opener, Delimiter closer) | |
| removeLastBracket | back to summary |
|---|---|
| private void removeLastBracket() | |
| reset | back to summary |
|---|---|
| pack-priv void reset(SourceLines lines) | |
| scanDelimiters | back to summary |
|---|---|
| private 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.
| |
| scanner | back to summary |
|---|---|
| public Scanner scanner() Implements jdk. Doc from jdk. Return a scanner for the input for the current position (on the character that the inline parser registered interest for).
Note that this always returns the same instance, if you want to backtrack you need to use
| |
| text | back to summary |
|---|---|
| private Text text(SourceLines sourceLines) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final List |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| canClose | back to summary |
|---|---|
| pack-priv final boolean canClose | |
| canOpen | back to summary |
|---|---|
| pack-priv final boolean canOpen | |
| characters | back to summary |
|---|---|
| pack-priv final List<Text> characters | |
| DelimiterData | back to summary |
|---|---|
| pack-priv DelimiterData(List<Text> characters, boolean canOpen, boolean canClose) | |