Open msftrncs opened 5 years ago
This seems reasonable and matches the common markspec: https://spec.commonmark.org/0.29/#block-quotes
Do you want to submit a PR and add a few tests for this?
I'll try to post a PR shortly. As I went through the spec for blockquotes, I noticed where the REGEX still failed some situations, and it became more complicated to correct, but I think I have it.
Copying comment from another repository: https://github.com/microsoft/vscode-textmate/issues/110#issuecomment-524756619
Example:
Actually (via GitHub):
VS Code Editor highlight:
From VS Code Preview:
I believe VS Code's Markdown grammar is wrong. The while rule is expecting to find additional lines starting with
>
but that is not how the previewer works. I believe the correct test is, at a minimum, a non-blank line. but possibly also tests for other kinds of markup, or precisely the same as thewhile
clause oflist_paragraph
. This is the correctwhile
condition forblockquote
:"while": "(^|\\G)([ ]{0,3}(>) ?|(?!\\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \\t]*$\\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\\.))"
. With this change, I get the correct scoping.