LearnNewsExamplesServices
Frontmatter
id8787
titleFix Markdown Frontmatter parsing for CRLF line endings
stateClosed
labels
bugai
assigneestobiu
createdAtJan 18, 2026, 7:44 PM
updatedAtJan 18, 2026, 7:47 PM
githubUrlhttps://github.com/neomjs/neo/issues/8787
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJan 18, 2026, 7:46 PM

Fix Markdown Frontmatter parsing for CRLF line endings

tobiu
tobiu commented on Jan 18, 2026, 7:44 PM

The regexFrontMatter in src/component/Markdown.mjs strictly expects \n (LF) line endings. When parsing content with \r\n (CRLF) line endings (e.g., resources/content/release-notes/v11.22.0.md), the regex fails to detect the frontmatter. This results in the frontmatter being rendered as a header in the UI.

Solution: Update regexFrontMatter to optionally match carriage returns.

tobiu
tobiu Jan 18, 2026, 7:45 PM

Input from Gemini 3 Pro:

✦ I have updated src/component/Markdown.mjs to allow optional carriage returns in the regexFrontMatter. This ensures that markdown files saved with CRLF line endings (like v11.22.0.md) are parsed correctly. Verified the fix with a reproduction script against the actual file content.