Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Line breaks in URLs #178

Closed
gnzlbg opened this issue Sep 28, 2017 · 3 comments
Closed

Line breaks in URLs #178

gnzlbg opened this issue Sep 28, 2017 · 3 comments

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Sep 28, 2017

Markdown supports line breaks on URLs:

[StackOverflow](
http://stackoverflow.com)

and

[StackOverflow interesting discussion](
    http://stackoverflow.com/this/discussion/has/a/very/
very/very/very/long/long/long/title/title/title)

but currently rustdoc does not (e.g. it inserts %0A in the URLs).

This is bad, because rustfmt cannot format long links, and if one splits them across different lines, rustdoc then fails to link properly.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Sep 28, 2017

Testcase (from stdsimd):

/// Round packed single-precision (32-bit) floating point elements in `a`
/// according to the flag `b`. The value of `b` may be as follows:
/// 0x00: Round to the nearest whole number.
/// 0x01: Round down, toward negative infinity.
/// 0x02: Round up, toward positive infinity.
/// 0x03: Truncate the values.
/// For a few additional values options, check [the LLVM docs](
///https://github.com/llvm-mirror/clang/blob/master/lib/Headers/avxintrin.h#L414
/// ).

stdsimd formatting style has a 79 column limit. That is, that link must be split into two lines. Everything I've tried breaks rustdoc.

@steveklabnik
Copy link
Owner

I don't believe this behavior is part of CommonMark.

Also, are you sure you've filed in the right place? This project can't really render real crates yet.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Sep 28, 2017

wrong place ! sorry!

@gnzlbg gnzlbg closed this as completed Sep 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants