withoutHtmlComments function

String withoutHtmlComments(
  1. String markdown
)

markdown without its HTML comments; fenced code keeps them.

Implementation

String withoutHtmlComments(String markdown) =>
    markdown.replaceAllMapped(_fenceOrComment, (Match m) => m[1] ?? '');