-
-
Notifications
You must be signed in to change notification settings - Fork 224
Incorrect closing sourcepos column for code blocks #141
New issue
Have a question about this pro 8000 ject? 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
Comments
i have the same problem with comments (
for the comment i expect to see the following sourcepos adding Line 772 in ffc5d87
and one more interesting thing: if i add several spaces before comment, like this:
i get |
Thanks for reporting! |
Improves on earlier fix to #141, which only worked for code blocks flush with the left margin.
Closes commonmark/commonmark.js#141. commonmark/commonmark.js@1f5a827 Author: John MacFarlane <jgm@berkeley.edu> Date: Thu Jan 9 08:38:20 2020 -0800
The
sourcepos
attribute for code blocks reports the column number for the line before the end of the block.Here's a quick test case:
I'd expect to see
[[1, 1], [3, 3]]
- the backticks start at L1C1 and end at L3C3. Instead, I see[[1, 1], [3, 11]]
, where the closing column number (11) is the length of thehello world
line before the closing backticks.The text was updated successfully, but these errors were encountered: