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

Bug: Markdown reference links need to always be single-line #4709

Closed
orta opened this issue Jun 17, 2018 · 2 comments
Closed

Bug: Markdown reference links need to always be single-line #4709

orta opened this issue Jun 17, 2018 · 2 comments
Labels
lang:markdown Issues affecting Markdown locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker.

Comments

@orta
Copy link
Contributor

orta commented Jun 17, 2018

Prettier 1.13.5

Effectively when prettier meets a reference link + url that's longer than the prose-wrap it will move the link to the next line. This breaks the markdown.

Playground link

--prose-wrap always

Input:

Again, an interesting trade-off. You can only get logs when you're looking for them, as opposed to when a problem
may actually have occurred. There's things I can do to work around this also, keep an installation's logs around for
a day in Peril

[ga]: https://blog.github.com/2016-09-14-a-whole-new-github-universe-announcing-new-tools-forums-and-features/#integrate-seamlessly-with-github
[nosqliscool]: https://www.infoworld.com/article/2990184/database/nosql-simply-isnt-hip-anymore.html
[probots]: https://probot.github.io

Output:

Again, an interesting trade-off. You can only get logs when you're looking for them, as opposed to when a problem
may actually have occurred. There's things I can do to work around this also, keep an installation's logs around for
a day in Peril

[ga]: 
  https://blog.github.com/2016-09-14-a-whole-new-github-universe-announcing-new-tools-forums-and-features/#integrate-seamlessly-with-github
[nosqliscool]: 
  https://www.infoworld.com/article/2990184/database/nosql-simply-isnt-hip-anymore.html
[probots]: https://probot.github.io

Expected behavior:

Again, an interesting trade-off. You can only get logs when you're looking for them, as opposed to when a problem
may actually have occurred. There's things I can do to work around this also, keep an installation's logs around for
a day in Peril

[ga]: https://blog.github.com/2016-09-14-a-whole-new-github-universe-announcing-new-tools-forums-and-features/#integrate-seamlessly-with-github
[nosqliscool]: https://www.infoworld.com/article/2990184/database/nosql-simply-isnt-hip-anymore.html
[probots]: https://probot.github.io
@ikatyang
Copy link
Member

This behavior is currently controlled by --prose-wrap, see #3531.

I'm not sure what should we do here since this formatting is valid in the CommonMark spec.

@j-f1 j-f1 added lang:markdown Issues affecting Markdown status:needs discussion Issues needing discussion and a decision to be made before action can be taken labels Jun 17, 2018
@orta
Copy link
Contributor Author

orta commented Jun 18, 2018

Interesting!

Taking the example from the test case, this is likely an issue with the non-commonmark md renderer I'm using (it's a 4-5 year old ruby app) - as the examples in #3531 work fine in GitHub ( see below )

just-url url-with-short-title url-with-long-title long long-with-title

So I'm going to close as not a bug, and the implementation is correct - thanks @ikatyang

@orta orta closed this as completed Jun 18, 2018
@ikatyang ikatyang added type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker. and removed status:needs discussion Issues needing discussion and a decision to be made before action can be taken labels Jun 18, 2018
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Sep 16, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:markdown Issues affecting Markdown locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker.
Projects
None yet
Development

No branches or pull requests

3 participants