Modifier and Type | Class and Description |
---|---|
private static class | |
private static class |
Modifier and Type | Field and Description |
---|---|
private final List | |
private boolean | |
private final List | |
private int | column
current column of input line (tab causes column to go to next 4-space tab stop) (0-based) |
private boolean | columnIsInTab
if the current column is within a tab character (partially consumed tab) |
private static final Set | |
private final LinkReferenceDefinitions | |
private final List | |
private final DocumentBlockParser | |
private final IncludeSourceSpans | |
private int | |
private int | index
current index (offset) in input line (0-based) |
private final InlineParserFactory | |
private SourceLine | |
private int | lineIndex
Line index (0-based) |
private int | |
private int | |
private static final Map | |
private final List |
Access | Constructor and Description |
---|---|
public | DocumentParser(List<BlockParserFactory> blockParserFactories, InlineParserFactory inlineParserFactory, List<DelimiterProcessor> delimiterProcessors, IncludeSourceSpans includeSourceSpans)
|
Modifier and Type | Method and Description |
---|---|
private void | |
private void | addChild(DocumentParser.
Add block of type tag as a child of the tip. |
private void | |
private void | |
private void | |
private void | |
public static List | calculateBlockParserFactories(List<BlockParserFactory> customBlockParserFactories, Set<Class<? extends Block>> enabledBlockTypes)
|
public static void | |
private void | |
private DocumentParser. | |
private void | |
private Document | |
private BlockStartImpl | |
private void | |
public BlockParser | |
public int | getColumn()
Implements jdk. The column is the position within the line after tab characters have been processed as 4-space tab stops. |
public static Set | |
public int | |
public int | |
public SourceLine | |
public int | |
public boolean | |
public Document | |
public Document | |
private void | |
private Block | |
private static CharSequence | |
private void | processInlines()
Walk through a block & children recursively, parsing string content into inline content where appropriate. |
private void | |
private void | |
private void |
allBlockParsers | back to summary |
---|---|
private final List<BlockParser> allBlockParsers |
blank | back to summary |
---|---|
private boolean blank |
blockParserFactories | back to summary |
---|---|
private final List<BlockParserFactory> blockParserFactories |
column | back to summary |
---|---|
private int column current column of input line (tab causes column to go to next 4-space tab stop) (0-based) |
columnIsInTab | back to summary |
---|---|
private boolean columnIsInTab if the current column is within a tab character (partially consumed tab) |
CORE_FACTORY_TYPES | back to summary |
---|---|
private static final Set<Class<? extends Block>> CORE_FACTORY_TYPES |
definitions | back to summary |
---|---|
private final LinkReferenceDefinitions definitions |
delimiterProcessors | back to summary |
---|---|
private final List<DelimiterProcessor> delimiterProcessors |
documentBlockParser | back to summary |
---|---|
private final DocumentBlockParser documentBlockParser |
includeSourceSpans | back to summary |
---|---|
private final IncludeSourceSpans includeSourceSpans |
indent | back to summary |
---|---|
private int indent |
index | back to summary |
---|---|
private int index current index (offset) in input line (0-based) |
inlineParserFactory | back to summary |
---|---|
private final InlineParserFactory inlineParserFactory |
line | back to summary |
---|---|
private SourceLine line |
lineIndex | back to summary |
---|---|
private int lineIndex Line index (0-based) |
nextNonSpace | back to summary |
---|---|
private int nextNonSpace |
nextNonSpaceColumn | back to summary |
---|---|
private int nextNonSpaceColumn |
NODES_TO_CORE_FACTORIES | back to summary |
---|---|
private static final Map<Class<? extends Block>, BlockParserFactory> NODES_TO_CORE_FACTORIES |
openBlockParsers | back to summary |
---|---|
private final List<DocumentParser. |
DocumentParser | back to summary |
---|---|
public DocumentParser(List<BlockParserFactory> blockParserFactories, InlineParserFactory inlineParserFactory, List<DelimiterProcessor> delimiterProcessors, IncludeSourceSpans includeSourceSpans) |
activateBlockParser | back to summary |
---|---|
private void activateBlockParser(DocumentParser. |
addChild | back to summary |
---|---|
private void addChild(DocumentParser. Add block of type tag as a child of the tip. If the tip can't accept children, close and finalize it and try its parent, and so on until we find a block that can accept children. |
addDefinitionsFrom | back to summary |
---|---|
private void addDefinitionsFrom(ParagraphParser paragraphParser) |
addLine | back to summary |
---|---|
private void addLine() Add line content to the active block parser. We assume it can accept lines -- that check should be done before calling this. |
addSourceSpans | back to summary |
---|---|
private void addSourceSpans() |
advance | back to summary |
---|---|
private void advance() |
calculateBlockParserFactories | back to summary |
---|---|
public static List |
checkEnabledBlockTypes | back to summary |
---|---|
public static void checkEnabledBlockTypes(Set<Class<? extends Block>> enabledBlockTypes) |
closeBlockParsers | back to summary |
---|---|
private void closeBlockParsers(int count) |
deactivateBlockParser | back to summary |
---|---|
private DocumentParser. |
finalize | back to summary |
---|---|
private void finalize(BlockParser blockParser) Finalize a block. Close it and do any necessary postprocessing, e.g. setting the content of blocks and collecting link reference definitions from paragraphs. |
finalizeAndProcess | back to summary |
---|---|
private Document finalizeAndProcess() |
findBlockStart | back to summary |
---|---|
private BlockStartImpl findBlockStart(BlockParser blockParser) |
findNextNonSpace | back to summary |
---|---|
private void findNextNonSpace() |
getActiveBlockParser | back to summary |
---|---|
public BlockParser getActiveBlockParser() Implements jdk.
|
getColumn | back to summary |
---|---|
public int getColumn() Implements jdk. Doc from jdk. The column is the position within the line after tab characters have been processed as 4-space tab stops.
If the line doesn't contain any tabs, it's the same as the
|
getDefaultBlockParserTypes | back to summary |
---|---|
public static Set |
getIndent | back to summary |
---|---|
public int getIndent() Implements jdk.
|
getIndex | back to summary |
---|---|
public int getIndex() Implements jdk.
|
getLine | back to summary |
---|---|
public SourceLine getLine() Implements jdk.
|
getNextNonSpaceIndex | back to summary |
---|---|
public int getNextNonSpaceIndex() Implements jdk.
|
isBlank | back to summary |
---|---|
public boolean isBlank() Implements jdk.
|
parse | back to summary |
---|---|
public Document parse(String input) The main parsing function. Returns a parsed document AST. |
parse | back to summary |
---|---|
public Document parse(Reader input) throws IOException |
parseLine | back to summary |
---|---|
private void parseLine(CharSequence ln) Analyze a line of text and update the document appropriately. We parse markdown text by calling this on each line of input, then finalizing the document. |
prepareActiveBlockParserForReplacement | back to summary |
---|---|
private Block prepareActiveBlockParserForReplacement() |
prepareLine | back to summary |
---|---|
private static CharSequence prepareLine(CharSequence line) Prepares the input line replacing |
processInlines | back to summary |
---|---|
private void processInlines() Walk through a block & children recursively, parsing string content into inline content where appropriate. |
setLine | back to summary |
---|---|
private void setLine(CharSequence ln) |
setNewColumn | back to summary |
---|---|
private void setNewColumn(int newColumn) |
setNewIndex | back to summary |
---|---|
private void setNewIndex(int newIndex) |
Modifier and Type | Field and Description |
---|---|
private final BlockParser |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public BlockParser | |
public SourceLines | getParagraphLines()
Implements jdk. Returns the current paragraph lines if the matched block is a paragraph. |
matchedBlockParser | back to summary |
---|---|
private final BlockParser matchedBlockParser |
MatchedBlockParserImpl | back to summary |
---|---|
public MatchedBlockParserImpl(BlockParser matchedBlockParser) |
getMatchedBlockParser | back to summary |
---|---|
public BlockParser getMatchedBlockParser() Implements jdk.
|
getParagraphLines | back to summary |
---|---|
public SourceLines getParagraphLines() Implements jdk. Doc from jdk. Returns the current paragraph lines if the matched block is a paragraph.
|
Modifier and Type | Field and Description |
---|---|
private final BlockParser | |
private int |
Access | Constructor and Description |
---|---|
pack-priv |
blockParser | back to summary |
---|---|
private final BlockParser blockParser |
sourceIndex | back to summary |
---|---|
private int sourceIndex |
OpenBlockParser | back to summary |
---|---|
pack-priv OpenBlockParser(BlockParser blockParser, int sourceIndex) |