{"action":"created","issue":{"url":"https://api.github.com/repos/rexxars/react-markdown/issues/223","repository_url":"https://api.github.com/repos/rexxars/react-markdown","labels_url":"https://api.github.com/repos/rexxars/react-markdown/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/rexxars/react-markdown/issues/223/comments","events_url":"https://api.github.com/repos/rexxars/react-markdown/issues/223/events","html_url":"https://github.com/rexxars/react-markdown/pull/223","id":364176382,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NDI4ODU0","number":223,"title":"Add ignoreTokens prop to allow skipping parse of specific Markdown tokens","user":{"login":"bjudson","id":542813,"node_id":"MDQ6VXNlcjU0MjgxMw==","avatar_url":"https://avatars0.githubusercontent.com/u/542813?v=4","gravatar_id":"","url":"https://api.github.com/users/bjudson","html_url":"https://github.com/bjudson","followers_url":"https://api.github.com/users/bjudson/followers","following_url":"https://api.github.com/users/bjudson/following{/other_user}","gists_url":"https://api.github.com/users/bjudson/gists{/gist_id}","starred_url":"https://api.github.com/users/bjudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjudson/subscriptions","organizations_url":"https://api.github.com/users/bjudson/orgs","repos_url":"https://api.github.com/users/bjudson/repos","events_url":"https://api.github.com/users/bjudson/events{/privacy}","received_events_url":"https://api.github.com/users/bjudson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-26T19:29:49Z","updated_at":"2018-09-27T14:18:21Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rexxars/react-markdown/pulls/223","html_url":"https://github.com/rexxars/react-markdown/pull/223","diff_url":"https://github.com/rexxars/react-markdown/pull/223.diff","patch_url":"https://github.com/rexxars/react-markdown/pull/223.patch"},"body":"Here's a proof of concept for the ability to disable parsing of specific tokens. I'm not excited about the level of messing with the parser prototype. And it does seem that some tokenizers just can't be disabled without throwing errors (eg a `list` tokenizer reference is hardcoded, so it can't be removed without breaking other things). In the test, I included the full list of tokenizers, and commented out the ones that don't seem to be cleanly removable. \r\n\r\nI'm conflicted about this, because the ability to disable parsing of some tokens is a requirement for us, and this seems like the best way to do it. On the other hand, `remark-parse` clearly wasn't designed for disabling these parsers, and the [documented method](https://github.com/remarkjs/remark/tree/master/packages/remark-parse#turning-off-a-tokenizer) for doing so is a brittle hack.\r\n\r\nIf it makes sense to move forward, there are some more tests, error handling & refactoring I plan to do, but just want to get some general feedback before spending more time on it.\r\n\r\nEager to hear others' thoughts on this approach."},"comment":{"url":"https://api.github.com/repos/rexxars/react-markdown/issues/comments/425110196","html_url":"https://github.com/rexxars/react-markdown/pull/223#issuecomment-425110196","issue_url":"https://api.github.com/repos/rexxars/react-markdown/issues/223","id":425110196,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTExMDE5Ng==","user":{"login":"bjudson","id":542813,"node_id":"MDQ6VXNlcjU0MjgxMw==","avatar_url":"https://avatars0.githubusercontent.com/u/542813?v=4","gravatar_id":"","url":"https://api.github.com/users/bjudson","html_url":"https://github.com/bjudson","followers_url":"https://api.github.com/users/bjudson/followers","following_url":"https://api.github.com/users/bjudson/following{/other_user}","gists_url":"https://api.github.com/users/bjudson/gists{/gist_id}","starred_url":"https://api.github.com/users/bjudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjudson/subscriptions","organizations_url":"https://api.github.com/users/bjudson/orgs","repos_url":"https://api.github.com/users/bjudson/repos","events_url":"https://api.github.com/users/bjudson/events{/privacy}","received_events_url":"https://api.github.com/users/bjudson/received_events","type":"User","site_admin":false},"created_at":"2018-09-27T14:18:21Z","updated_at":"2018-09-27T14:18:21Z","author_association":"NONE","body":"Thanks for the quick response. I didn't realize quite how brittle this approach would be until I worked on the implementation, but I agree it's worth reaching out to remark about this. I'll open an issue and see if we can make some improvements on their end."}}
{"actor":{"display_login":"bjudson"}}