Comment Stripping¶
HTML comments are stripped before any other processing stage.
Automatic Stripping¶
Comments are removed during PM.parse:
After parsing:
The comment text is removed; surrounding whitespace and newlines stay where they were.
Multiline Comments¶
Multiline comments are fully removed:
Comments Before Metadata¶
Comments before the YAML front matter are stripped first, so the metadata parser sees clean input:
The blank line left behind by the comment is tolerated: front matter is recognised after leading whitespace.
Comments Inside Code Fences¶
Comment stripping is a plain text pass and does not know about fenced code blocks.
A <!-- ... --> inside a fence is removed too.
Direct Access¶
The comment stripping method is available as a standalone utility:
Use Cases¶
- Editor notes -- Leave comments for prompt authors that don't appear in the rendered output
- Disabled sections -- Temporarily comment out parts of a prompt
- Documentation -- Annotate prompt files without affecting the AI input