Conversation
…indicators
`escapeYaml` only triggered on `:`, `#`, `"`, `'`, or newline, so titles
beginning with YAML 1.2 reserved indicator chars (`-`, `?`, `[`, `{`, `>`,
`|`, `!`, etc.) emitted unquoted scalars that strict parsers treat as
sequences/flow nodes — corrupting the frontmatter for any artifact whose
`<title>` or `<h1>` starts with such a character.
Also quote values with leading/trailing whitespace, which similarly fail to
round-trip through plain scalars.
Signed-off-by: hqhq1025 <[email protected]>
Contributor
There was a problem hiding this comment.
Findings
- No high-confidence issues found in added/modified lines.
Summary
- Review mode: initial. No blocking/major/minor findings in the current diff. Residual risk: not all YAML edge cases are exhaustively covered by tests;
docs/VISION.mdanddocs/PRINCIPLES.mdare Not found in repo/docs in this checkout.
Testing
- Not run (automation)
open-codesign Bot
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.
Summary
escapeYamlinpackages/exporters/src/markdown.tsonly quoted values containing:,#,\",', or\n. Titles beginning with YAML 1.2 reserved indicator chars (-,?,[,{,>,|,!,&,*,%,@,\`` etc.) produced unquoted scalars that strict YAML parsers re-interpret as sequences / flow nodes — corrupting the markdown export's frontmatter whenever the artifact<title>or` happened to start with one.
Compatibility / upgradeability / no bloat / elegance
JSON.stringify(already in this file).schemaVersion: 1frontmatter.Test plan
pnpm --filter @open-codesign/exporters test(30 passing, including 2 new cases for indicator-prefixed and whitespace-padded titles).pnpm --filter @open-codesign/exporters typecheck.pnpm lint.