Draft: Implement escape characters for text format transformers#4449
Draft: Implement escape characters for text format transformers#4449themagickoala wants to merge 3 commits intofacebook:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
I've added a few more test cases which highlight some failures with double characters, going to take a look into that. |
|
I think we should go ahead and split markdown into two separate packages:
|
I wonder if we can keep a single package, just expose different utilities from it. I understand the idea of not having the large 3P dependencies, but structured properly those should be tree-shaken out for anyone not using exports that depend on them. |
FWIW that's pretty much what we ended up doing in our editor because regex based matching wasn't reliable or complete enough. On plain text paste events we first run the text through markdown-it with the same setup/plug-ins we use elsewhere then effectively "paste" the resulting HTML so that it's run through all of our node's |
|
FYI @fantactuka I'm no longer working this PR as I've fully switched over to lexical-remark. Feel free to close it. |
An attempt at allowing TextMatchTransformers to specify escape characters.
On export, will add in escape characters (if no formatting has been applied already).
On import, will strip out escape characters and not apply the transformer formatting.
I'm almost certain I've missed some behaviours here. I've added a very basic test case, but could probably do with adding more!