-
Notifications
You must be signed in to change notification settings - Fork 67
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
🐛 FIX: Combination of blockquotes, list and newlines causes IndexError #207
Conversation
Codecov Report
@@ Coverage Diff @@
## master #207 +/- ##
==========================================
- Coverage 96.17% 96.10% -0.07%
==========================================
Files 61 61
Lines 3213 3211 -2
==========================================
- Hits 3090 3086 -4
- Misses 123 125 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -296,6 +296,4 @@ def blockquote(state: StateBlock, startLine: int, endLine: int, silent: bool): | |||
|
|||
state.blkIndent = oldIndent | |||
|
|||
state.lineMax += 1 |
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 increment doesn't exist in JS upstream so removing it https://github.com/markdown-it/markdown-it/blob/750a954d586c526e92bc4305bde2552743304d13/lib/rules_block/blockquote.js#L282
@@ -147,7 +147,6 @@ def skipEmptyLines(self, from_pos: int) -> int: | |||
]: | |||
break | |||
except IndexError: | |||
from_pos += 1 |
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 increment seems like a porting error of the JS for loop so removing it. Actually the break
statement seems incorrect here. Using pass
now to emulate a falsy condition of the if
statement.
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.
LGTM cheers
Closes #204