Skip to content

Conversation

@mib112
Copy link
Contributor

@mib112 mib112 commented Apr 12, 2022

When parsing an incomplete url without host like "http://" a IndexError will be thrown. In contrast to this the upstream javascript version returns an almost empty parse result:

url {protocol: 'http:', slashes: true, auth: null, port: null, hostname: '', pathname: null, search: null, hash: null}

The IndexError occurs in Python on accessing an array with a negative index. In contrast, in javascript a negative index results in the value "undefined".

See also executablebooks/markdown-it-py#205

@welcome
Copy link

welcome bot commented Apr 12, 2022

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.

Welcome to the EBP community! 🎉

@codecov-commenter
Copy link

Codecov Report

Merging #7 (6542655) into master (5c2b361) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master       #7   +/-   ##
=======================================
  Coverage   77.02%   77.02%           
=======================================
  Files           6        6           
  Lines         296      296           
=======================================
  Hits          228      228           
  Misses         68       68           
Impacted Files Coverage Δ
src/mdurl/_parse.py 97.85% <100.00%> (ø)

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 5c2b361...6542655. Read the comment docs.

@hukkin hukkin merged commit 26aa23b into executablebooks:master Apr 12, 2022
@welcome
Copy link

welcome bot commented Apr 12, 2022

Congrats on your first merged pull request in this project! 🎉
congrats

Thank you for contributing, we are very proud of you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants