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
blockedBy[]
blocking[]
closedAtJan 18, 2026, 7:46 PM

Fix Markdown Frontmatter parsing for CRLF line endings

Closed v11.23.0 bugai
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 added the bug label on Jan 18, 2026, 7:44 PM
tobiu added the ai label on Jan 18, 2026, 7:44 PM
tobiu added the core label on Jan 18, 2026, 7:44 PM
tobiu referenced in commit 2cc62dd - "fix: Markdown Frontmatter parsing now supports CRLF line endings (#8787)" on Jan 18, 2026, 7:45 PM
tobiu assigned to @tobiu on Jan 18, 2026, 7:45 PM
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.

tobiu closed this issue on Jan 18, 2026, 7:46 PM
tobiu removed the core label on Jan 18, 2026, 7:47 PM