Skip to content
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

Merged
merged 2 commits into from
Apr 14, 2020
Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Apr 14, 2020

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

@eps1lon eps1lon added the docs Improvements or additions to the documentation label Apr 14, 2020
@@ -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
Copy link
Member Author

@eps1lon eps1lon Apr 14, 2020

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.

Copy link
Member

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.

@mui-pr-bot
Copy link

mui-pr-bot commented Apr 14, 2020

No bundle size changes comparing b3dafd8...3260a0a

Generated by 🚫 dangerJS against 3260a0a

@eps1lon eps1lon marked this pull request as ready for review April 14, 2020 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants