about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-07 07:41:32 +0000
committerbors <bors@rust-lang.org>2015-04-07 07:41:32 +0000
commitde51bbec15bd689b9c56e8596d1a1e973b707bbd (patch)
tree5119d965ea7c9b4252ea62705b4e8577dc3d9675 /src/libstd/sys/unix/stack_overflow.rs
parentc52d46e778f48f12452b65455614a249e4365066 (diff)
parent46cc6e5fc31377c001a5a12c5079388253eecfbc (diff)
downloadrust-de51bbec15bd689b9c56e8596d1a1e973b707bbd.tar.gz
rust-de51bbec15bd689b9c56e8596d1a1e973b707bbd.zip
Auto merge of #24116 - zaeleus:rustdoc-codespan, r=alexcrichton
Because the current style for `code` in rustdoc is to prewrap whitespace, code spans that are hard wrapped in the source documentation are prematurely wrapped when rendered in HTML. [For example][2],

```
/// ...
/// type can be borrowed as multiple different types. In particular, `Vec<T>:
/// Borrow<Vec<T>>` and `Vec<T>: Borrow<[T]>`.
```

renders as

![screen shot 2015-04-06 at 12 11 21](https://cloud.githubusercontent.com/assets/191331/7008216/2706b3b0-dc56-11e4-941e-1b0154fcbc5c.png)

because "`Vec<T>: Borrow<Vec<T>>`" wraps to the next line in the source.

CommonMark 0.18 [[1]] specifies "interior spaces and line endings are collapsed into single spaces" for code spans, which would actually prevent this issue, but hoedown does not currently conform to the
CommonMark spec.

The added span-level callback attempts to adhere to how whitespace is handled as described by CommonMark, fixing the issue of early, unintentional wrapping of code spans in rendered HTML.

[1]: http://spec.commonmark.org/0.18/
[2]: https://doc.rust-lang.org/std/borrow/trait.Borrow.html
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions