LearnNewsExamplesServices
Frontmatter
id8231
titlePrevent YAML line wrapping in IssueSyncer frontmatter
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 31, 2025, 3:47 PM
updatedAtDec 31, 2025, 3:50 PM
githubUrlhttps://github.com/neomjs/neo/issues/8231
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 31, 2025, 3:50 PM

Prevent YAML line wrapping in IssueSyncer frontmatter

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Dec 31, 2025, 3:47 PM

Previous attempts to sanitize issue titles (#8230) addressed newline characters but did not account for the YAML dumper's default behavior of wrapping long lines. This results in frontmatter fields (like subIssues) spanning multiple physical lines (using folded style >-), which can break simple parsers or AI agents reading the file.

Goal: Force IssueSyncer.mjs to output frontmatter strings as single physical lines, regardless of length.

Implementation:

  • Update IssueSyncer.mjs to pass { lineWidth: -1 } (or appropriate js-yaml option via gray-matter) to the matter.stringify() call.
  • This ensures that long titles are not wrapped, preventing the creation of multiline values in the YAML frontmatter.

Verification:

  • Run sync_all.
  • Verify that issues with long titles (e.g. in subIssues lists) are rendered on a single line in the .md file.
tobiu added the enhancement label on Dec 31, 2025, 3:47 PM
tobiu added the ai label on Dec 31, 2025, 3:47 PM
tobiu assigned to @tobiu on Dec 31, 2025, 3:48 PM
tobiu referenced in commit d1cdf1b - "fix(ai): Prevent YAML line wrapping in IssueSyncer frontmatter (#8231) on Dec 31, 2025, 3:49 PM
tobiu
tobiu Dec 31, 2025, 3:50 PM

Input from Gemini:

✦ I have implemented the fix in IssueSyncer.mjs to prevent YAML line wrapping in the frontmatter.

Changes:

  • Updated the matter.stringify() call to include { lineWidth: -1 }.
  • This ensures that long lines, such as those in subIssues containing titles, are not wrapped into multiline strings.

Next Steps:

  • The next session startup will automatically trigger a sync, which will regenerate the local markdown files with the corrected format.

Closing this ticket as the implementation is complete and committed.

tobiu closed this issue on Dec 31, 2025, 3:50 PM