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

fix(ComponentExample): fix crash on show HTML #3314

Merged
merged 1 commit into from
Nov 30, 2018
Merged

Conversation

layershifter
Copy link
Member

Fixes #3283.

This PR:

  • updates Prettier
  • fixes HTML preview via adding new parser for Prettier
  • adds prettier config for .mdx files
  • adds jsxSingleQuote for Prettier

@codecov-io
Copy link

Codecov Report

Merging #3314 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3314   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files         170      170           
  Lines        2802     2802           
=======================================
  Hits         2799     2799           
  Misses          3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5767c1...82a1212. Read the comment docs.

plugins: window.prettierPlugins,
})

return formatted
.replace(/^;</, '<') // remove beginning comma in JSX/HTML
.replace(/="([\s\S]*?)?"/gm, "='$1'") // single quote JSX
Copy link
Member Author

Choose a reason for hiding this comment

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

Covered by jsxSingleQuote ⭐️

@layershifter layershifter merged commit e672e11 into master Nov 30, 2018
@layershifter layershifter deleted the fix/example-html branch December 4, 2018 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: show HTML does not work for Search module
2 participants