Top Inners Fields Constructors Methods
com.vladsch.flexmark.ext.macros.internal

public Class MacroDefinitionBlockParser

extends AbstractBlockParser
Class Inheritance
Imports
com.vladsch.flexmark.ext.gitlab.GitLabBlockQuote, com.vladsch.flexmark.ext.gitlab.internal.GitLabBlockQuoteParser, com.vladsch.flexmark.ext.macros.MacroDefinitionBlock, .MacrosExtension, com.vladsch.flexmark.parser.InlineParser, com.vladsch.flexmark.parser.block.*, com.vladsch.flexmark.util.ast.Block, .BlockContent, .Node, com.vladsch.flexmark.util.data.DataHolder, com.vladsch.flexmark.util.sequence.BasedSequence, org.jetbrains.annotations.NotNull, .Nullable, java.util.Collections, .HashSet, .List, .Set, java.util.regex.Matcher, .Pattern

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class

Field Summary

Modifier and TypeField and Description
private final MacroDefinitionBlock
private BlockContent
private boolean
pack-priv static Pattern
pack-priv static Pattern
pack-priv static Pattern

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
canContain(ParserState
parser state
state
,
BlockParser
block parser
blockParser
,
Block
new block being started @return true if this block parser's block can contain the given block type, false if it cannot
block
)

Overrides com.vladsch.flexmark.parser.block.AbstractBlockParser.canContain.

Implements com.vladsch.flexmark.parser.block.BlockParser.canContain.

public void
public Block
public boolean
public void
parseInlines(InlineParser
instance of inline parser
inlineParser
)

Overrides com.vladsch.flexmark.parser.block.AbstractBlockParser.parseInlines.

Implements com.vladsch.flexmark.parser.block.BlockParser.parseInlines.

Do inline processing for the block content using the given inline parser interface

public BlockContinue
tryContinue(ParserState
current parsing state
state
)

Implements com.vladsch.flexmark.parser.block.BlockParser.tryContinue.

See if the block parser can continue parsing the current block

Inherited from com.vladsch.flexmark.parser.block.AbstractBlockParser:
breakOutOnDoubleBlankLinecanInterruptByfinalizeClosedBlockgetBlockContentgetDataHolderisClosedisInterruptibleisParagraphParserisPropagatingLastBlankLineisRawTextremoveBlankLines

Field Detail

blockback to summary
private final MacroDefinitionBlock block
contentback to summary
private BlockContent content
hadCloseback to summary
private boolean hadClose
MACRO_BLOCK_ENDback to summary
pack-priv static Pattern MACRO_BLOCK_END
MACRO_BLOCK_STARTback to summary
pack-priv static Pattern MACRO_BLOCK_START
MACRO_BLOCK_START_INTELLIJback to summary
pack-priv static Pattern MACRO_BLOCK_START_INTELLIJ

Constructor Detail

MacroDefinitionBlockParserback to summary
pack-priv MacroDefinitionBlockParser(DataHolder options, BasedSequence openMarker, BasedSequence name, BasedSequence openTrailing)

Method Detail

addLineback to summary
public void addLine(ParserState state, BasedSequence line)

Overrides com.vladsch.flexmark.parser.block.AbstractBlockParser.addLine.

Implements com.vladsch.flexmark.parser.block.BlockParser.addLine.

Doc from com.vladsch.flexmark.parser.block.BlockParser.addLine.

Add another line to the block

Parameters
state:ParserState

parser state

line:BasedSequence

line sequence

Annotations
@Override
canContainback to summary
public boolean canContain(ParserState state, BlockParser blockParser, Block block)

Overrides com.vladsch.flexmark.parser.block.AbstractBlockParser.canContain.

Implements com.vladsch.flexmark.parser.block.BlockParser.canContain.

Parameters
state:ParserState

Doc from com.vladsch.flexmark.parser.block.BlockParser.canContain.

parser state

blockParser:BlockParser

Doc from com.vladsch.flexmark.parser.block.BlockParser.canContain.

block parser

block:Block

Doc from com.vladsch.flexmark.parser.block.BlockParser.canContain.

new block being started @return true if this block parser's block can contain the given block type, false if it cannot

Annotations
@Override
closeBlockback to summary
public void closeBlock(ParserState state)

Implements com.vladsch.flexmark.parser.block.BlockParser.closeBlock.

Annotations
@Override
getBlockback to summary
public Block getBlock()

Implements com.vladsch.flexmark.parser.block.BlockParser.getBlock.

Returns:Block

Doc from com.vladsch.flexmark.parser.block.BlockParser.getBlock.

the block parser's block node instance

Annotations
@Override
isContainerback to summary
public boolean isContainer()

Overrides com.vladsch.flexmark.parser.block.AbstractBlockParser.isContainer.

Implements com.vladsch.flexmark.parser.block.BlockParser.isContainer.

Returns:boolean

Doc from com.vladsch.flexmark.parser.block.BlockParser.isContainer.

true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.

Annotations
@Override
parseInlinesback to summary
public void parseInlines(InlineParser inlineParser)

Overrides com.vladsch.flexmark.parser.block.AbstractBlockParser.parseInlines.

Implements com.vladsch.flexmark.parser.block.BlockParser.parseInlines.

Doc from com.vladsch.flexmark.parser.block.BlockParser.parseInlines.

Do inline processing for the block content using the given inline parser interface

Parameters
inlineParser:InlineParser

instance of inline parser

Annotations
@Override
tryContinueback to summary
public BlockContinue tryContinue(ParserState state)

Implements com.vladsch.flexmark.parser.block.BlockParser.tryContinue.

Doc from com.vladsch.flexmark.parser.block.BlockParser.tryContinue.

See if the block parser can continue parsing the current block

Parameters
state:ParserState

current parsing state

Returns:BlockContinue

block continue instance

Annotations
@Override
com.vladsch.flexmark.ext.macros.internal back to summary

private Class MacroDefinitionBlockParser.BlockFactory

extends AbstractBlockParserFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
public BlockStart

Constructor Detail

BlockFactoryback to summary
pack-priv BlockFactory(DataHolder options)

Method Detail

haveBlockQuoteParserback to summary
pack-priv boolean haveBlockQuoteParser(ParserState state)
tryStartback to summary
public BlockStart tryStart(ParserState state, MatchedBlockParser matchedBlockParser)

Implements com.vladsch.flexmark.parser.block.BlockParserFactory.tryStart.

Annotations
@Override
com.vladsch.flexmark.ext.macros.internal back to summary

public Class MacroDefinitionBlockParser.Factory

extends Object
implements CustomBlockParserFactory
Class Inheritance
  • java.lang.Object
  • com.vladsch.flexmark.ext.macros.internal.MacroDefinitionBlockParser.Factory
All Implemented Interfaces
com.vladsch.flexmark.parser.block.CustomBlockParserFactory, com.vladsch.flexmark.util.dependency.Dependent, java.util.function.Function

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public @NotNull BlockParserFactory
apply(@NotNull DataHolder
the function argument
options
)

Implements java.util.function.Function.apply.

Applies this function to the given argument.

public @Nullable Set<Class<?>>
public @Nullable Set<Class<?>>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Factoryback to summary
public Factory()

Method Detail

affectsGlobalScopeback to summary
public boolean affectsGlobalScope()

Implements com.vladsch.flexmark.util.dependency.Dependent.affectsGlobalScope.

Returns:boolean

Doc from com.vladsch.flexmark.util.dependency.Dependent.affectsGlobalScope.

true if this dependent affects the global scope, which means that any that depend on it have to be run after this dependent has run against all elements. Otherwise, the dependent can run on an element after its dependents have processed an element. parsed.

Annotations
@Override
applyback to summary
public @NotNull BlockParserFactory apply(@NotNull DataHolder options)

Implements java.util.function.Function.apply.

Doc from java.util.function.Function.apply.

Applies this function to the given argument.

Parameters
options:@NotNull DataHolder

the function argument

Returns:@NotNull BlockParserFactory

the function result

Annotations
@NotNull
@Override
getAfterDependentsback to summary
public @Nullable Set<Class<?>> getAfterDependents()

Implements com.vladsch.flexmark.util.dependency.Dependent.getAfterDependents.

Returns:@Nullable Set<Class<?>>

Doc from com.vladsch.flexmark.util.dependency.Dependent.getAfterDependents.

null or a list of dependents that must be executed before calling this one if any of the blocks in the list affect global state then these will be run on ALL blocks of the document before this preprocessor is called.

Annotations
@Nullable
@Override
getBeforeDependentsback to summary
public @Nullable Set<Class<?>> getBeforeDependents()

Implements com.vladsch.flexmark.util.dependency.Dependent.getBeforeDependents.

Returns:@Nullable Set<Class<?>>

Doc from com.vladsch.flexmark.util.dependency.Dependent.getBeforeDependents.

null or a list of dependents that must be executed after calling this one if any of the blocks in the list affect global state then these will be run on ALL blocks of the document before this preprocessor is called.

Annotations
@Nullable
@Override