Have you read the Contributing Guidelines on issues?
Prerequisites
Description
Page titles will be rendered incorrectly depending on which newline format has been chosen.
✔ Linux (LF): Works as expected. Text of the first Markdown header is displayed.
❌ Windows (CRLF): Original filename and text of the first Markdown header is displayed.
❌ macOS (CR): Original filename is displayed. It's also missing the "Hello" text.
Here is a repro repository:
https://github.com/andgeno/docusaurus-repro-newline-encoding-bug
See the second commit for the actual demo files involved.
Some screenshots:




Reproducible demo
https://github.com/andgeno/docusaurus-repro-newline-encoding-bug
Steps to reproduce
- Create a new file and encode it Windows or macOS newline format.
- Add a Markdown header to make the title look different / nicer than just the raw filename.
- Visit page of that new file.
- Page title will be rendered incorrectly.
Expected behavior
Titles should render the same in all cases.
Actual behavior
Titles render wrong depending on chosen newline format.
Your environment
- Docusaurus version used: 2.0.0-beta.18
Self-service
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
Page titles will be rendered incorrectly depending on which newline format has been chosen.
✔ Linux (LF): Works as expected. Text of the first Markdown header is displayed.
❌ Windows (CRLF): Original filename and text of the first Markdown header is displayed.
❌ macOS (CR): Original filename is displayed. It's also missing the "Hello" text.
Here is a repro repository:
https://github.com/andgeno/docusaurus-repro-newline-encoding-bug
See the second commit for the actual demo files involved.
Some screenshots:
Reproducible demo
https://github.com/andgeno/docusaurus-repro-newline-encoding-bug
Steps to reproduce
Expected behavior
Titles should render the same in all cases.
Actual behavior
Titles render wrong depending on chosen newline format.
Your environment
Self-service