Markdown parser fails with CRLF line endings on Windows #17
Unanswered
Pleko-script
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Description
The markdown parsers in
src/lib/product-loader.tsfail to parse files with CRLF line endings (Windows-style), causing product overview and roadmap content not to display on the homepage.Environment
product/product-overview.md,product/product-roadmap.mdSteps to Reproduce
product/product-overview.mdandproduct/product-roadmap.mdon Windows/product-visionand/product-roadmapcommandsnpm run devRoot Cause
The regex patterns in
parseProductOverview()andparseProductRoadmap()use\nfor line matching, but Windows files have\r\n(CRLF) line endings. This causes the regex to fail to match section headers and content.Fix
Normalize line endings before parsing:
Beta Was this translation helpful? Give feedback.
All reactions