Open dbaynard opened 5 years ago
Sorry i didn't see this sooner @dbaynard Sounds like a great addition. I'll look at it later today.
looks good seems to work @dbaynard . I'd like to request the following changes to the PR before I merge it though
'LineIsFenced()'
tests and make a LineIsHTMLComment()
set of tests?The only differences I can think of is that the comment tests should account for
--->
E.g. and my comment ends on this line -->
-->
-->
<!--
E.g. <!-- this comment starts here
<!--
(and no trailing space)<!--
(including trailing space)<!-- I'm a comment -->
The reason I'm asking for this is that I want to make sure that new features don't break your work without anyone noticing. I'm happy to report that your changes didn't cause the fenced code tests to fail. :)
I have added instructions for running the tests to the README. Please let me know if they are insufficient or if you have problems making it work.
Thanks for the review. I've encountered numerous corner cases myself, too. I'll run the tests — though it will likely be another week or so. I'll get back in touch, then.
I've found it useful to fold commented sections of text.
There are two commits: the first implements the changes by duplicating the code block treatment, the second uses a pair of regexes which match both code blocks and html comments. It seems to work (so far) in nested mode, though I haven't tried stacked mode. I don't know how nested code blocks within html comments will work (or vice versa, I suppose).
I hope you find it useful, too!