Open amit1rrr opened 4 years ago
So the issue turned out to be broad regex for italics which I have modified in my fork.
The problem with the previous regex is that it captures any 2 underscores and converts the text between them to italics. e.g. my_local_var would convert local to italics. IMHO that is not how markdown intended it to be. The word should only become italics when starts and ends with underscore and there is no whitespace character immediately before or after the underscores.
Anyway my regex fixes the issue and is working fine for me.
I have created a PR here: https://github.com/patleeman/quill-markdown-shortcuts/pull/34
Hope someone can review this.
ps @amit1rrr as someone who just found this module, I'm excited to see that there are people actively working to make it better! I'm hoping to start using it and contributing back as well if I find any issues!
First of all, thank you @patleeman and all other contributors for an amazing Quill module. This was literally drop in for something that I considered would take me a week or more to support at ReviewNB.
One of the issues we are facing is how to set precedence when there are nested markdown shortcuts used? E.g. when people type
[x for x in my_long_list_of_params]
the underscores take precedence over backticks. This results in unintended formatting.Is there configuration of some sort which would help us set precedence for markdown shortcuts?