Guillaume Gomez
143f7be8b6
Remove strings fulfilled with whitespaces in code block headers
2017-04-11 17:36:52 +02:00
Guillaume Gomez
d4aecf52db
Fix block code headers parsing
2017-04-09 18:31:59 +02:00
QuietMisdreavus
8dd4c44ef6
merge with master to pick up pulldown switch
2017-04-09 10:38:38 -05:00
Corey Farwell
cd2310b93c
Rollup merge of #41131 - euclio:collapse-animation, r=GuillaumeGomez
...
rustdoc: collapse docblock before showing label
The animation for collapsing descriptions is currently pretty jarring, as the label starts fading in as the description is collapsing. This causes the description to jump down a line (and sometimes change indentation) while animating.
This PR modifies this behavior to collapse the block entirely before starting to fade in the collapse button label.
While this PR works well for descriptions of structs, traits, etc., it still does not look ideal for attributes. I'd appreciate any suggestions for improving that animation. Perhaps we want to optimize for the single-attribute case, and try not to collapse the attribute list entirely before fading in the label?
2017-04-07 09:20:11 -04:00
Andy Russell
8a1d2a3a5a
rustdoc: collapse docblock before showing label
2017-04-06 21:56:47 -04:00
QuietMisdreavus
bfd01b7f40
rustdoc: move the space at the end of where clauses
...
...so that we don't indent the next line by one extra space
2017-04-06 18:36:14 -05:00
QuietMisdreavus
ae0e45c028
rustdoc: where clause adjustment to fix tests
...
- add spaces to output so stripping lines and breaking spaces renders
the same
- add commas to where clauses in rustdoc tests to match the new output
2017-04-06 14:19:45 -05:00
Oliver Middleton
f9fb381b2a
rustdoc: Use pulldown-cmark for Markdown HTML rendering
...
Instead of rendering all of the HTML in rustdoc this relies on
pulldown-cmark's `push_html` to do most of the work. A few iterator
adapters are used to make rustdoc specific modifications to the output.
This also fixes MarkdownHtml and link titles in plain_summary_line.
2017-04-06 13:09:20 +01:00
QuietMisdreavus
36bc448c00
style: space between struct name and opening brace
2017-04-05 10:02:37 -05:00
QuietMisdreavus
5bffa0aa50
rustdoc: don't add a space before { on traits with where clauses
...
cc #41025
2017-04-04 11:16:16 -05:00
QuietMisdreavus
6bc3d65948
rustdoc: properly indent fn signatures in traits
2017-04-04 10:31:57 -05:00
Guillaume Gomez
b02cb1978c
Handle ordered lists as well
2017-04-04 00:24:08 +02:00
bors
72ecd79a6c
Auto merge of #40919 - GuillaumeGomez:fix-new-rustdoc, r=frewsxcv,steveklabnik
...
Add support for image, rules and footnotes
Part of #40912 .
r? @rust-lang/docs
PS: the footnotes are waiting for https://github.com/google/pulldown-cmark/pull/21 to be merged to be fully working.
2017-04-02 18:16:09 +00:00
Guillaume Gomez
ef01ae7fe0
Force footnote references to be sorted by id
2017-04-01 00:31:37 -06:00
QuietMisdreavus
3643d81659
rustdoc: fix alignment of fn arguments when on multiple lines
2017-03-31 19:02:00 -05:00
QuietMisdreavus
80bff6b596
rustdoc: format where clauses like rust-lang-nursery/fmt-rfcs#38
2017-03-31 18:04:42 -05:00
Guillaume Gomez
51d3cec387
Fix hard break issue
2017-03-31 12:16:03 -06:00
Corey Farwell
488a7b3945
Rollup merge of #40888 - wesleywiser:rustdoc_src_sidebar, r=GuillaumeGomez
...
Make the rustdoc sidebar white on `src` pages
Fixes #40724
2017-03-31 11:43:33 -04:00
Guillaume Gomez
36b15f0409
Fix multiple footnotes and improve testing
2017-03-30 17:29:54 -06:00
Guillaume Gomez
08a741eabf
Add support for image, rules and footnotes
2017-03-29 19:48:06 -06:00
bors
abf5592510
Auto merge of #40338 - GuillaumeGomez:pulldown-switch, r=frewsxcv,steveklabnik
...
Replace hoedown with pull in rustdoc
cc @rust-lang/docs
2017-03-29 07:06:13 +00:00
Wesley Wiser
2040daee47
Make the rustdoc sidebar white on src pages
...
Fixes #40724
2017-03-28 22:45:10 -04:00
QuietMisdreavus
8206d0c54e
rustdoc: format fns like format rfc 39
2017-03-28 16:49:05 -05:00
Guillaume Gomez
a7c6d3e16a
Improve function naming
2017-03-28 11:54:11 -06:00
Guillaume Gomez
286a51da91
Fix id generation
2017-03-28 11:38:56 -06:00
Guillaume Gomez
47e4abf473
Fix plain_summary_line function
2017-03-28 11:38:56 -06:00
Guillaume Gomez
e51f3253be
Handle html in markdown as well
2017-03-28 11:38:55 -06:00
Guillaume Gomez
6a2190c18e
Remove unneeded comment
2017-03-28 11:38:55 -06:00
Guillaume Gomez
6d470a9c4a
Add a macro to improve code
2017-03-28 11:38:55 -06:00
Guillaume Gomez
d5b6c046de
Add missing markdown tags
2017-03-28 11:38:55 -06:00
Guillaume Gomez
b96fef8411
End of pulldown switch and remove completely hoedown
2017-03-28 11:38:55 -06:00
Guillaume Gomez
c9415eb98f
Remains to fix tables
2017-03-28 11:38:55 -06:00
Guillaume Gomez
08a80cbda6
Replace hoedown with pull in rustdoc
2017-03-28 11:38:55 -06:00
Oliver Schneider
eb447f4ef4
Fix various useless derefs and slicings
2017-03-27 08:58:00 +02:00
Corey Farwell
667e3166d8
Rollup merge of #40567 - clarcharr:rustdoc-sort, r=frewsxcv
...
Fix for #39596 : sort Trait2 before Trait10.
This is a change discussed in #39596 . Essentially, item names will be sorted as if they're (&str, u64) pairs instead of just `&str`, meaning that `"Apple" < "Banana"` and also `"Fruit10" > "Fruit2"`.
Sample sorting:
1. Apple
2. Banana
3. Fruit
4. Fruit0
5. Fruit00
6. Fruit1
7. Fruit01
8. Fruit2
9. Fruit02
10. Fruit20
11. Fruit100
12. Pear
Examples of generated documentation:
https://docs.charr.xyz/before-doc/test_sorting/
https://docs.charr.xyz/after-doc/test_sorting/
Screenshots of generated documentation:
Before: http://imgur.com/Ktb10ti
After: http://imgur.com/CZJjqIN
2017-03-24 18:13:09 -05:00
Clar Charr
c09083c3d1
Fix for #39596 : sort Trait1 before Trait2.
2017-03-23 18:21:34 -04:00
Corey Farwell
b2d62e8737
Rollup merge of #40725 - Cldfire:master, r=estebank
...
Remove duplicated styling in main.css
If nothing else, it saves a bit of data.
2017-03-22 19:30:34 -04:00
Cldfire
e2b5a8cf57
Remove duplicate style classes
2017-03-21 23:40:41 -04:00
Guillaume Gomez
f53172287a
Add whitespace around "=" in assoc items
2017-03-21 16:22:15 -04:00
Corey Farwell
d49f86901c
Rollup merge of #40587 - GuillaumeGomez:rustdoc-const-display, r=frewsxcv
...
Fix invalid debug display for associated consts
Fixes #40568 .
r? @rust-lang/docs
cc @SergioBenitez
2017-03-19 20:51:13 -04:00
Corey Farwell
a04c7de2cf
Rollup merge of #40564 - GuillaumeGomez:rustdoc-const, r=frewsxcv
...
Fix const not displayed in rustdoc
Fixes #40331 .
r? @rust-lang/docs
2017-03-19 10:18:15 -04:00
bors
9c15de4fd5
Auto merge of #40346 - jseyfried:path_and_tokenstream_attr, r=nrc
...
`TokenStream`-based attributes, paths in attribute and derive macro invocations
This PR
- refactors `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.
- supports macro invocation paths for attribute procedural macros.
- e.g. `#[::foo::attr_macro] struct S;`, `#[cfg_attr(all(), foo::attr_macro)] struct S;`
- supports macro invocation paths for derive procedural macros.
- e.g. `#[derive(foo::Bar, super::Baz)] struct S;`
- supports arbitrary tokens as arguments to attribute procedural macros.
- e.g. `#[foo::attr_macro arbitrary + tokens] struct S;`
- supports using arbitrary tokens in "inert attributes" with derive procedural macros.
- e.g. `#[derive(Foo)] struct S(#[inert arbitrary + tokens] i32);`
where `#[proc_macro_derive(Foo, attributes(inert))]`
r? @nrc
2017-03-19 10:56:08 +00:00
Guillaume Gomez
5364acb418
Fix invalid debug display for associated consts
2017-03-17 00:27:36 +01:00
Guillaume Gomez
9b892745ad
Fix const not displayed in rustdoc
2017-03-16 02:15:10 +01:00
Jeffrey Seyfried
68c1cc68b4
Refactor Attribute to use Path and TokenStream instead of MetaItem.
2017-03-14 04:03:43 +00:00
Wesley Wiser
8b9b3b6d8b
Fix sidebar not extending to the bottom of the page
...
Fixes #40459
2017-03-13 20:36:41 -04:00
bors
a5483a7f36
Auto merge of #40451 - ollie27:rustdoc_impls_js_escape, r=GuillaumeGomez
...
rustdoc: Fix string escaping in implementors js files
The generated HTML can contain quotes so we need to make sure they are
escaped before inserting into the js files.
2017-03-13 12:44:22 +00:00
Oliver Middleton
19e0505dc7
rustdoc: Fix string escaping in implementors js files
...
The generates HTML can contain quotes so we need to make sure they are
escaped before inserting into the js files.
2017-03-12 05:12:27 +00:00
Ariel Ben-Yehuda
7b0caa58d9
Rollup merge of #40419 - GuillaumeGomez:fix-const-rendering, r=frewsxcv
...
Fix associated consts display
Fixes #40370 .
r? @frewsxcv
2017-03-11 21:57:49 +02:00
Guillaume Gomez
ea3c82cd96
Fix associated consts display
2017-03-10 16:21:07 +01:00