Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
| [![PR App][icn]][demo] | RM-9815 | | :--------------------: | :-----: | ## 🧰 Changes Adds an option for remark plugins. By adding the `remarkPlugins` option, I can write a small plugin to support indexing in the main app. We recently decided we're going to refocus this repo to only deal with converting MDX to React. Recently, we've been adding a lot of code that is specific only to our editor, and we'd like to move that someplace. The problem I'm trying to solve is for indexing. When converting `mdast` to `hast`, in MDX, we lose some information. `remark-rehype` doesn't know what to do with `mdxJsxFlowElements` and replaces them with `div`'s. **mdx** ```mdx <h2>Hello, world!</h2> ``` **mdast** ```json { "type": "root", "children": [ { "type": "mdxJsxFlowElement", "name": "h2", "children": [ { "type": "text", "value": "Hello, world!" } ] } ] } ``` **hast** ```json { "type": "root", "children": [ { "type": "element", "tagName": "div", "children": [ { "type": "element", "tagName": "p", "children": [ { "type": "text", "value": "Hello, world!" } ] } ] } ] } ``` ## 🧬 QA & Testing - [Broken on production][prod]. - [Working in this PR app][demo]. [demo]: https://markdown-pr-PR_NUMBER.herokuapp.com [prod]: https://SUBDOMAIN.readme.io [icn]: https://user-images.githubusercontent.com/886627/160426047-1bee9488-305a-4145-bb2b-09d8b757d38a.svg
- Loading branch information