GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 🐛 FIX: Combination of blockquotes, list and newlines causes IndexError by hukkin · Pull Request #207 · executablebooks/markdown-it-py

Conversation

@hukkin

@hukkin hukkin commented Apr 13, 2022

Copy link
Copy Markdown
Contributor

Closes #204

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hukkin
🐛 FIX: Combination of blockquotes, list and newlines causes an IndexE…
d4a9c75
…rror
@codecov

codecov Bot commented Apr 13, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #207 (3fa0fb5) into master (8928b0e) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

@@            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     
Flag Coverage Δ
pytests 96.10% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
markdown_it/rules_block/blockquote.py 100.00% <ø> (ø)
markdown_it/rules_block/state_block.py 95.68% <0.00%> (-1.46%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8928b0e...3fa0fb5. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hukkin
hukkin commented Apr 13, 2022
View reviewed changes
Comment thread markdown_it/rules_block/blockquote.py

state.blkIndent = oldIndent

state.lineMax += 1

@hukkin hukkin Apr 13, 2022

Copy link
Copy Markdown
Contributor Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread markdown_it/rules_block/state_block.py
]:
break
except IndexError:
from_pos += 1

@hukkin hukkin Apr 13, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hukkin and others added 2 commits April 14, 2022 12:26
@hukkin
Replace break with pass
7b83422
@chrisjsewell
Merge branch 'master' into issue-204
3fa0fb5
chrisjsewell
chrisjsewell approved these changes Apr 15, 2022
View reviewed changes

@chrisjsewell chrisjsewell left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chrisjsewell
chrisjsewell merged commit 2a67873 into executablebooks:master Apr 15, 2022
@hukkin
hukkin deleted the issue-204 branch April 15, 2022 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chrisjsewell chrisjsewell chrisjsewell approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Combination of blockquotes, list and newlines causes an IndexError

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@hukkin @chrisjsewell
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.