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

feat(gatsby-remark-prism-js): add additional html escapes #20156

Conversation

patricksimonian
Copy link
Contributor

Description

This feature adds the option escapeEntities to the gatsby-remark-prismjs plugin. This option allows users to provide an additional set of characters to be escaped when MD files are processed by this plugin.

As outlined in issue #20128. I found it necessary to allow for additional HTML entities to be escaped when processing markdown files. I had initially authored a local plugin to do this but then it ran into incompatibilities with the prism js plugin. Since gatsby-remark-prismjs already escapes a small set of HTML entities, I felt adding this feature to this particular plugin was most appropriate.

Documentation

Documentation has been added to the plugin's README.md file.

Related Issues

Fixes #20128

@patricksimonian patricksimonian requested review from a team as code owners December 16, 2019 18:24
@patricksimonian patricksimonian changed the title feature: gatsby-remark-prism-js add additional html escapes feat(gatsby-remark-prism-js): add additional html escapes Dec 16, 2019
@patricksimonian patricksimonian force-pushed the feat/gatsby-remark-prismjs-html-escape branch from e232ad0 to d3e4ba6 Compare December 16, 2019 19:46
@patricksimonian patricksimonian added the status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response label Dec 18, 2019
freiksenet
freiksenet previously approved these changes Dec 19, 2019
Copy link
Contributor

@freiksenet freiksenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would appreciate an additional test if you have time, but it lgtm otherwise.

Thanks a lot!

@freiksenet freiksenet added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Dec 20, 2019
@gatsbybot gatsbybot merged commit c484c04 into gatsbyjs:master Dec 20, 2019
@freiksenet
Copy link
Contributor

@patricksimonian Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gatsby-remark-prismjs optionally allow additional html entities to be escaped
4 participants