convertHtmlToMarkdown function
Implementation
String convertHtmlToMarkdown(
String htmlText, List<hm2.Rule>? rules, List<String> ignoreRules,
{bool removeLeadingWhitespaces = false, bool escape = true}) {
if (!ignoreRules.contains('underline')) ignoreRules.add('underline');
return hm2.convert(
styleOptions: <String, String>{'emDelimiter': '*'},
htmlText,
escape: escape,
rules: rules,
removeLeadingWhitespaces: removeLeadingWhitespaces,
ignore: ignoreRules,
);
}