Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Comments in Markdown aren't really a thing, but they can come in super-useful. As alluded to in the test-case, MOE can be used to sync between internally developed projects and open-source versions. Part of that requires maintaining internal & external developer docs. MOE directives in comments make that a lot easier, but if they can't appear in the middle of a bullet list that becomes a lot harder.
Current Behavior
src/document.c recognizes
<!--...-->
style comments as a standalone block.src/smarty_pants.c seems to recognize them anywhere though I haven't tested.
Changes
This adds a test-case and tweaks document.c to copy HTML comments over the same way it copies tags over.
The HTML comment recognizing code is a bit of a copy/paste job from
parse_htmlblock
but that version does a bunch of extra work. I can factor out the common code if you'd like.