Skip to content
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

Unwanted line break in link url breaks the link #70

Closed
dp-dev opened this issue Feb 14, 2022 · 3 comments
Closed

Unwanted line break in link url breaks the link #70

dp-dev opened this issue Feb 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@dp-dev
Copy link

dp-dev commented Feb 14, 2022

Adding a long link in the markdown file will not work as the link will be splitted at a certain length of characters to break the line into the next one.

Steps to reproduce the behavior: I added a very long link line in the document like this one to experience this error:

md_file.new_line(md_file.new_inline_link(link="https://www.rezeptwelt.de/saucendipsbrotaufstriche-rezepte/bbq-sauce-aus-finessen-32015/yqmvpwuf-77b3e-450897-cfcd2-84c8tcgw", text="rezeptwelt.de/saucendipsbrotaufstriche-rezepte/bbq-sauce-aus-finessen-32015/yqmvpwuf-77b3e-450897-cfcd2-84c8tcgw", bold_italics_code='i'))

Expected behavior
I would expect to have a proper link displayed however the link is not working as the output in the markdown file looks like this with the unwanted line break:

[*rezeptwelt.de/saucendipsbrotaufstriche-rezepte/bbq-sauce-aus-
finessen-32015/yqmvpwuf-77b3e-450897-cfcd2-84c8tcgw*](https://www.rezeptwelt.de/saucendipsbrotaufstriche-rezepte/bbq-
sauce-aus-finessen-32015/yqmvpwuf-77b3e-450897-cfcd2-84c8tcgw)

Further information

  • OS: Windows
  • Version 1.3.1

Would be great if this could be fixed as this is I guess some sort of formatting issue which breaks fully working links.

@dp-dev dp-dev added the bug Something isn't working label Feb 14, 2022
@didix21
Copy link
Owner

didix21 commented Feb 17, 2022

Ouch good catch! I'll try to deal as soon as possible. Thanks for reporting.

@martinjo
Copy link

This is is a irritating bug. But it can be avoided by specifying wrap_width=0.
md_file.write(md_file.new_inline_image(text='image-text', path='http://...'), wrap_width=0)

@dp-dev
Copy link
Author

dp-dev commented Apr 3, 2022

@martinjo, thank you for sharing this - I can confirm that this works and solves this issue for me in the used version.

didix21 added a commit that referenced this issue May 31, 2022
Disable wrap_width by default as it was given a lot of problems with links and tables
didix21 added a commit that referenced this issue May 31, 2022
Disable wrap_width by default as it was given a lot of problems with links and tables
@didix21 didix21 closed this as completed May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants