summary refs log tree commit diff
path: root/src/librustdoc/html/markdown.rs
AgeCommit message (Collapse)AuthorLines
2019-02-23Transition librustdoc to 2018 editionHirokazu Hata-13/+13
2019-02-10rustc: doc commentsAlexander Regueiro-5/+5
2019-01-14rustdoc: check code block syntax in early passAndy Russell-0/+109
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-13Split on words insteadGuillaume Gomez-2/+16
2018-12-11Remove unneeded extra chars to reduce search-index sizeGuillaume Gomez-1/+5
2018-11-10Remove short doc where it starts with a codeblockGuillaume Gomez-22/+28
2018-11-04add Debug impls for the Options structsQuietMisdreavus-1/+1
2018-11-02swap uses of Matches with pre-parsed argsQuietMisdreavus-1/+1
2018-10-09Add lint for doc without codeblocksGuillaume Gomez-2/+4
2018-09-20Add a documentation banner for edition specific codePhilip Munksgaard-13/+44
2018-09-19Add support for running doc test in specific editionPhilip Munksgaard-18/+32
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-5/+6
2018-08-07Avoid unnecessary pattern matching against Option and Resultljedrz-1/+1
2018-07-31Cleanup highlighting codeMark Rousskov-1/+0
Removes some unused code and de-publicizes structs
2018-07-31Remove global derive_id and reset_ids functionsMark Rousskov-49/+105
Previously these functions relied on TLS but we can instead thread the relevant state through explicitly.
2018-07-31Format code for easier editingMark Rousskov-6/+5
2018-07-31Further extract error code switchMark Rousskov-27/+54
Removes dependency on UnstableFeatures from markdown rendering
2018-07-31Remove dependency on error handling from find_testable_codeMark Rousskov-8/+13
2018-07-31Provide test configuration through structMark Rousskov-15/+10
This is far more sound than passing many different arguments of the same type.
2018-07-31Provide warnings for invalid code blocks in markdown filesMark Rousskov-5/+3
Previously we would only warn on Rust code but we can also do so when testing markdown (the diag::Handler is available).
2018-07-31Pull out nightly checking to edgesMark Rousskov-8/+7
Parsing the code block's LangString (```foo) previously checked itself to see if we were on nightly; that isn't the right place to do so. Move that check slightly outwards to better abstract LangString. (This is also an optimization as we avoid the costly environment variable load of RUSTC_BOOTSTRAP).
2018-07-27Prefer to_string() to format!()ljedrz-4/+4
2018-07-06Auto merge of #51861 - GuillaumeGomez:prevent-some-markdown-short-doc, ↵bors-7/+36
r=QuietMisdreavus Prevent some markdown transformation on short docblocks Before: <img width="1440" alt="screen shot 2018-06-28 at 01 46 01" src="https://user-images.githubusercontent.com/3050060/42005762-7d533bbe-7a76-11e8-8361-027886803399.png"> After: <img width="1440" alt="screen shot 2018-06-28 at 01 46 02" src="https://user-images.githubusercontent.com/3050060/42005768-81bd59a0-7a76-11e8-819b-9b4be72579d6.png"> This is only performed on short doc blocks, not on plain ones. Not all transformations are prevented (you still have a few like urls, code blocks, etc...). cc @nical r? @QuietMisdreavus
2018-06-28Prevent some markdown transformation on short docblocksGuillaume Gomez-7/+36
2018-06-26rustdoc codeblock hash escapeLucas Morales-10/+10
2018-06-03Show which line the link is coming from.kennytm-3/+22
2018-03-22Rollup merge of #49189 - GuillaumeGomez:fix-implied-shortcut-links, ↵kennytm-2/+2
r=QuietMisdreavus Fix automatic urls with backticks Fixes #49164. r? @QuietMisdreavus
2018-03-19Fix automatic urls with backticksGuillaume Gomez-2/+2
2018-03-18Add warning for invalid start of code blocks in rustdocGuillaume Gomez-1/+6
2018-03-16fix doctestQuietMisdreavus-1/+1
2018-02-21Rollup merge of #48382 - GuillaumeGomez:fix-rustdoc-test-panic, r=estebankGuillaume Gomez-12/+15
Fix rustdoc test ICE Fixes #48377. r? @QuietMisdreavus
2018-02-20Fix rustdoc test ICEGuillaume Gomez-12/+15
2018-02-18Generate shortcut linksManish Goregaokar-2/+19
2018-02-18Include shortcut links in markdown_linksManish Goregaokar-7/+19
2018-02-17Remove useless commentGuillaume Gomez-1/+0
2018-02-16Remove hoedown from rustdocGuillaume Gomez-688/+60
Is it really time? Have our months, no, *years* of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long? ----- So, timeline for those who need to catch up: * Way back in December 2016, [we decided we wanted to switch out the markdown renderer](https://github.com/rust-lang/rust/issues/38400). However, this was put on hold because the build system at the time made it difficult to pull in dependencies from crates.io. * A few months later, in March 2017, [the first PR was done, to switch out the renderers entirely](https://github.com/rust-lang/rust/pull/40338). The PR itself was fraught with CI and build system issues, but eventually landed. * However, not all was well in the Rustdoc world. During the PR and shortly after, we noticed [some differences in the way the two parsers handled some things](https://github.com/rust-lang/rust/issues/40912), and some of these differences were major enough to break the docs for some crates. * A couple weeks afterward, [Hoedown was put back in](https://github.com/rust-lang/rust/pull/41290), at this point just to catch tests that Pulldown was "spuriously" running. This would at least provide some warning about spurious tests, rather than just breaking spontaneously. * However, the problems had created enough noise by this point that just a few days after that, [Hoedown was switched back to the default](https://github.com/rust-lang/rust/pull/41431) while we came up with a solution for properly warning about the differences. * That solution came a few weeks later, [as a series of warnings when the HTML emitted by the two parsers was semantically different](https://github.com/rust-lang/rust/pull/41991). But that came at a cost, as now rustdoc needed proc-macro support (the new crate needed some custom derives farther down its dependency tree), and the build system was not equipped to handle it at the time. It was worked on for three months as the issue stumped more and more people. * In that time, [bootstrap was completely reworked](https://github.com/rust-lang/rust/pull/43059) to change how it ordered compilation, and [the method by which it built rustdoc would change](https://github.com/rust-lang/rust/pull/43482), as well. This allowed it to only be built after stage1, when proc-macros would be available, allowing the "rendering differences" PR to finally land. * The warnings were not perfect, and revealed a few [spurious](https://github.com/rust-lang/rust/pull/44368) [differences](https://github.com/rust-lang/rust/pull/45421) between how we handled the renderers. * Once these were handled, [we flipped the switch to turn on the "rendering difference" warnings all the time](https://github.com/rust-lang/rust/pull/45324), in October 2017. This began the "warning cycle" for this change, and landed in stable in 1.23, on 2018-01-04. * Once those warnings hit stable, and after a couple weeks of seeing whether we would get any more reports than what we got from sitting on nightly/beta, [we switched the renderers](https://github.com/rust-lang/rust/pull/47398), making Pulldown the default but still offering the option to use Hoedown. And that brings us to the present. We haven't received more new issues from this in the meantime, and the "switch by default" is now on beta. Our reasoning is that, at this point, anyone who would have been affected by this has run into it already.
2018-01-29rustdoc: Fix link title rendering with hoedownOliver Middleton-1/+1
The link title needs to be HTML escaped.
2018-01-22don't process code blocks when scanning for linksQuietMisdreavus-2/+1
2018-01-22Temporary fix missing escape_href in hoedown_link by copying pulldown's codeManish Goregaokar-1/+53
2018-01-22Fix unit testsManish Goregaokar-3/+3
2018-01-22Don't return early and discard the link in hoedown modeManish Goregaokar-1/+1
2018-01-22add intra-links support to hoedownQuietMisdreavus-8/+66
2018-01-22cleanupQuietMisdreavus-2/+8
2018-01-22Add LinkReplacer pass for pulldownManish Goregaokar-7/+40
2018-01-22resolve paths when cleaning docsQuietMisdreavus-0/+3
2018-01-22new function to pull the links from a chunk of markdownQuietMisdreavus-167/+250
2018-01-10Use correct line offsets for doctests (fixes #45868)Manish Goregaokar-2/+2
2017-11-14Rollup merge of #45815 - QuietMisdreavus:happy-little-notices, r=GuillaumeGomezGuillaume Gomez-4/+4
rustdoc: tweak notes on ignore/compile_fail examples Part of https://github.com/rust-lang/rust/issues/44927 This is a softening of these notices to mention *why* a given example has a given callout, rather then telling viewers to be careful with an example. It also changes the character used for these samples from a warning logo to a circle-i/information logo. ![image](https://user-images.githubusercontent.com/5217170/32464361-5fbb5d9e-c305-11e7-8482-ce71b97a54df.png)
2017-11-06tweak notes on ignore/compile_fail examplesQuietMisdreavus-4/+4