Repository navigation
notation: warn when a directive is not in a comment the language reads - #5
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1
A directive written in a comment syntax that the block's language does not read, such as
<!-- [!callout …] -->in anmdxblock or// [!code focus]in a Python block, stayed in the code as text with no build warning.parseLine()innotation.ts, the one place every directive goes through, now warns when a line has no comment that holds a directive but has a known, unescaped directive outside a string. The message names the syntaxes to use, for example:src/content/docs/example.md, mdx code block, line 1:[!callout /import/]is not in a comment that this block reads. Use{/* */}. It shows as text.Which blocks warn: only languages that have a comment syntax (built-in or from
notation.comments). A language with no syntax, or one set to[](the docs site does this formd,markdownandmdx), reads no directives and never warns. Escaped directives ([\!code …]), directives in a string, and unknown[!word]text such as Markdown alerts orarr[!flag]stay silent. No new opt-out was added; the decision is in.agents/DECISIONS.md.pnpm lint,pnpm test,pnpm lint:docsandpnpm docs:buildpass, and the docs build logs no warnings.🤖 Generated with Claude Code