-
-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block quote marker revision #789
base: master
Are you sure you want to change the base?
Conversation
This is the simplest fix commonmark#460 that I can think of that matches the behavior of the reference implementation. It's not simple, because the behavior being described is complex, but it needs to be spelled out.
First, there should probably (at the top?) be something about Second, the term “marker” to me sounds like it would only be the Q: Is it intentional that you use “list marker” on L3731? Should that not be about block quotes? Last, as we are discussing changes to block quotes, I wonder: could we “eat” the entire |
Thanks, woorm, for catching that "list marker" mistake.
Already exists. Line 288 in 260b808
No it's not. Thanks! That was a good catch.
No, I'm not discussing changes to block quotes. I'm discussing changes to the specification language to match what the reference implementation, and any other implementation that forked or imitated it, already does. |
To prepend a [complete block quote marker] to a line, calculate its | ||
indentation without the block quote marker at the current column (N1), | ||
then insert `>` at the start of the line, then calculate its indentation at | ||
the same column (N2, which will equal N1 unless the line starts with a tab), | ||
then add M=N1+1-N2 spaces of indentation (if M is negative, remove spaces). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence calls for adding or removing spaces after adding the >
, so the resulting line has M+N2 spaces after the >
. Though M might be negative, M+N2 equals N1+1, which is a positive number.
This is the simplest fix #460 that I can think of that matches the behavior of the reference implementation. It's not simple, because the behavior being described is complex, but it needs to be spelled out.