Document constructor

Document({
  1. Iterable<BlockSyntax>? blockSynTaxes,
  2. Iterable<InlineSyntax>? inlineSynTaxes,
  3. ExtensionSet? extensionSet,
  4. Resolver? linkResolver,
  5. Resolver? imageLinkResolver,
})

Implementation

Document({
  Iterable<BlockSyntax>? blockSynTaxes,
  Iterable<InlineSyntax>? inlineSynTaxes,
  ExtensionSet? extensionSet,
  this.linkResolver,
  this.imageLinkResolver,
}) : extensionSet = extensionSet ?? ExtensionSet.commonMark {
  _blockSynTaxes
    ..addAll(blockSynTaxes ?? [])
    ..addAll(this.extensionSet.blockSyntaxes);
  _inlineSynTaxes
    ..addAll(inlineSynTaxes ?? [])
    ..addAll(this.extensionSet.inlineSyntaxes);
}