Document constructor

Document({
  1. Iterable<BlockSyntax>? blockSyntaxes,
  2. Iterable<InlineSyntax>? inlineSyntaxes,
  3. ExtensionSet? extensionSet,
  4. Resolver? linkResolver,
  5. Resolver? imageLinkResolver,
  6. _BlockParserBuilder blockParserBuilder = _newBlockParser,
  7. _InlineParserBuilder inlineParserBuilder = _newInlineParser,
  8. dynamic options,
  9. bool encodeHtml = true,
  10. bool checkable = false,
  11. 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);
}