[Closed] On iOS HTML Comments Hit And Miss?

And that I did work on on my flight home.

The following action takes the current draft’s content and replaces it with a version that has no HTML comments.

The core of it is a javascript function that can be repurposed.

One note: I originally tried to do it with regular expressions but couldn’t get the multi-line comment case to work.

One other note: I don’t know if it’s useful but part of the function is building an array of comment start and stop offsets. That would enable you to build a list of stripped out comments. (I don’t know why you would but you could.)

As always, fixes and enhancements welcome.