-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Refactor markdown parsing #20549
Conversation
@@ -7,17 +7,6 @@ import { withStyles } from '@material-ui/core/styles'; | |||
import textToHash from 'docs/src/modules/utils/textToHash'; | |||
import prism from 'docs/src/modules/components/prism'; | |||
|
|||
// Monkey patch to preserve non-breaking spaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They no longer replace non-breaking spaces (https://github.com/markedjs/marked/blob/v0.8.2/lib/marked.js#L553) but they also do not replace the newline symbol \u2424
with newline escape sequences anymore. It's unclear if this affects us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No clue, the original motivation was #10252. Probably worth trying +1.
No bundle size changes comparing b3dafd8...3260a0a |
f109eda
to
3260a0a
Compare
The goal is to have a single, side-effect free function that parses markdown we use (customizable with renderers for specific elements like heading or link).
This is in preparation for #20539