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(editor-components): match any characters with shortcodes #2268

Merged
merged 2 commits into from
Apr 10, 2019

Conversation

erquhart
Copy link
Contributor

@erquhart erquhart commented Apr 3, 2019

Summary

Allows editor component patterns to match anything, including markdown symbols and HTML.

  • Removes pattern matching against sanitized paragraph node text
  • Replaces with a true Remark tokenizer for actual "shortcode" node types
  • New tokenizer runs before any Remark tokenizer, making the entire raw Markdown string available for pattern matching

Paves the way for MDX support 🎉🎉

Related to #2064.
Closes #2266.

Test plan

Tests forthcoming.

@netlify
Copy link

netlify bot commented Apr 3, 2019

Preview proposed changes to the CMS demo site in the link below:

Built with commit 451e46f

https://deploy-preview-2268--cms-demo.netlify.com

@erquhart erquhart force-pushed the feat/prioritized-shortcodes branch from 88f9fd5 to 451e46f Compare April 10, 2019 19:02
@erquhart erquhart marked this pull request as ready for review April 10, 2019 19:23
@erquhart erquhart merged commit 14b6292 into decaporg:master Apr 10, 2019
@erquhart erquhart deleted the feat/prioritized-shortcodes branch April 10, 2019 19:23
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.

Custom editor components doesn't work with grave accents
1 participant