Update default regex to not match newlines and improve cleanup Markdown list matching#639
Update default regex to not match newlines and improve cleanup Markdown list matching#639baincd wants to merge 1 commit into
Conversation
|
Hi @Gruntfuggly , I understand you don't want change the default regex, but I feel this isn't really a change but a fix to the existing default regex. You can see my explanation for my suggested changes above. I have already applied this in my own settings, but I really think this fix could benefit other users and even potentially resolve some outstanding issues. Either way you decide, thank you for your consideration 😄 |
I would disagree that this is a bug. I believe this is exactly how it is intended to work - one of the conditions a tag is matched is if the only chars before it on the line is whitespace To accomplish what I believe you are looking for (to not to match tags preceded by only whitespace), I would suggest trying this modified version of this PR: Of course you are free to make this modification in your own settings, but this change should not be made to the default regex because as @Gruntfuggly has made perfectly clear the functionality of default regex will not be changed. (This PR only fix bugs in the default regex without changing it's functionality) |
|
The changes 1+2 actually are a change that effects current highlighting "intended for better highlighting markdown", while "the main part" 3 does fix a bug. Can you please move 1+2 out to a separate PR in the hope that the main change gets merged to close the linked bug? |


I understand that changes to the default regex are rejected. However, this PR does not change the default regex, but rather fixes a couple of issues with the default regex.
Here is the current regex, and the proposed regex as entered in the Settings UI editor

.1X TODOto match-or1.1.TODOor-TODOmatching, as those are not valid markdown lists($TAGS)to only match spaces and tabs (not newlines)