DeltaToMarkdown constructor
DeltaToMarkdown({
- Map<
String, EmbedToMarkdown> ? customEmbedHandlers, - Map<
String, CustomAttributeHandler> ? customTextAttrsHandlers, - DeltaToMarkdownVisitLineHandleNewLine? visitLineHandleNewLine,
- CustomContentHandler customContentHandler = escapeSpecialCharacters,
Implementation
DeltaToMarkdown({
Map<String, EmbedToMarkdown>? customEmbedHandlers,
Map<String, CustomAttributeHandler>? customTextAttrsHandlers,
this.visitLineHandleNewLine,
this.customContentHandler = escapeSpecialCharacters,
}) {
if (customEmbedHandlers != null) {
_embedHandlers.addAll(customEmbedHandlers);
}
if (customTextAttrsHandlers != null) {
for (final entry in customTextAttrsHandlers.entries) {
_textAttrsHandlers[entry.key] = _AttributeHandler(
beforeContent: entry.value.beforeContent,
afterContent: entry.value.afterContent,
);
}
}
}