Document constructor
Document({
- Iterable<
BlockSyntax> ? blockSyntaxes, - Iterable<
InlineSyntax> ? inlineSyntaxes, - ExtensionSet? extensionSet,
- Resolver? linkResolver,
- Resolver? imageLinkResolver,
- _BlockParserBuilder blockParserBuilder = _newBlockParser,
- _InlineParserBuilder inlineParserBuilder = _newInlineParser,
- dynamic options,
- bool encodeHtml = true,
- bool checkable = false,
- bool emptyListDisabled = false,
Implementation
Document({
Iterable<BlockSyntax>? blockSyntaxes,
Iterable<InlineSyntax>? inlineSyntaxes,
ExtensionSet? extensionSet,
this.linkResolver,
this.imageLinkResolver,
_BlockParserBuilder blockParserBuilder = _newBlockParser,
_InlineParserBuilder inlineParserBuilder = _newInlineParser,
this.options,
this.encodeHtml = true,
this.checkable = false,
this.emptyListDisabled = false,
}) : extensionSet = extensionSet ?? ExtensionSet.commonMark,
_blockParserBuilder = blockParserBuilder,
_inlineParserBuilder = inlineParserBuilder {
_blockSyntaxes
..addAll(blockSyntaxes ?? [])
..addAll(this.extensionSet.blockSyntaxes);
_inlineSyntaxes
..addAll(inlineSyntaxes ?? [])
..addAll(this.extensionSet.inlineSyntaxes);
}