about summary refs log tree commit diff
path: root/src/librustdoc/markdown.rs
AgeCommit message (Collapse)AuthorLines
2019-08-29Run doctests via out-of-process rustcAndreas Jonson-5/+2
2019-08-27Rollup merge of #62600 - emmericp:libtest-add-show-output, r=gnzlbgMazdak Farrokhzad-1/+1
libtest: add --show-output flag to print stdout of successful tests This pull request adds a new flag `--show-output` for tests to show the output of successful tests. For most formatters this was already supported just not exposed via the CLI (apparently only used by `librustdoc`). I've also added support for this option in the JSON formatter. This kind of fixes https://github.com/rust-lang/rust/issues/54669 which wants `--format json` to work with `--nocapture`, which is... well, impossible. What this issue really calls for is `--show-output` as implemented here.
2019-08-11Drop RefCell from IdMap in markdown renderingMark Rousskov-3/+2
2019-08-11Remove thread-local for playground configMark Rousskov-5/+6
2019-07-11libtest: add --show-output optionPaul Emmerich-1/+1
this new flag enables printing the captured stdout of successful tests utilizing the already existing display_output test runner option
2019-07-01Remove needless lifetimesJeremy Stucki-1/+1
2019-05-06set the default edition when pre-parsing a doctestQuietMisdreavus-3/+9
2019-04-22upgrade rustdoc's pulldown-cmark to 0.4.1Andy Russell-4/+3
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-2/+2
2019-02-23Transition librustdoc to 2018 editionHirokazu Hata-8/+6
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2019-01-17Persist doc test executables to given path.Wesley Norris-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-12Bump to 1.33.0Alex Crichton-1/+1
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-2/+2
2018-11-02pass the Options struct instead of individual argsQuietMisdreavus-27/+24
2018-11-02swap uses of Matches with pre-parsed argsQuietMisdreavus-6/+5
2018-11-02parse command-line into a central Options structQuietMisdreavus-2/+2
2018-10-21Use markdown::render instead of using pulldown_cmark directlyGuillaume Gomez-1/+1
2018-08-19mv (mod) codemap source_mapDonato Sciarra-1/+1
2018-07-31Remove global derive_id and reset_ids functionsMark Rousskov-6/+5
Previously these functions relied on TLS but we can instead thread the relevant state through explicitly.
2018-07-31Further extract error code switchMark Rousskov-4/+7
Removes dependency on UnstableFeatures from markdown rendering
2018-07-31Remove dependency on error handling from find_testable_codeMark Rousskov-1/+5
2018-07-31Provide warnings for invalid code blocks in markdown filesMark Rousskov-1/+1
Previously we would only warn on Rust code but we can also do so when testing markdown (the diag::Handler is available).
2018-07-27Prefer to_string() to format!()ljedrz-2/+2
2018-05-14replace error/warning println with structured diagQuietMisdreavus-7/+8
2018-04-13add -C parameter to rustdocQuietMisdreavus-3/+4
2018-04-02suppress the default allow(unused) under --display-warningsQuietMisdreavus-0/+1
2018-03-28use --edition for doctests, rather than just the crateQuietMisdreavus-2/+3
2018-03-18Add warning for invalid start of code blocks in rustdocGuillaume Gomez-1/+1
2018-02-16Remove hoedown from rustdocGuillaume Gomez-51/+11
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-22Add LinkReplacer pass for pulldownManish Goregaokar-1/+1
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-8/+7
2017-12-07fix markdown file differencesGuillaume Gomez-12/+4
2017-12-07Generate difference warnings for markdown files as wellGuillaume Gomez-6/+47
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-2/+2
2017-09-28Migrate to eprint/eprintln macros where appropriate.Corey Farwell-11/+3
2017-07-06rustdoc: Don't run Markdown tests twiceOliver Middleton-2/+6
This matches the behaviour for finding tests in Rust files.
2017-05-05Add Options type in libtest and remove argumentGuillaume Gomez-4/+2
2017-05-02Add option to display warnings in rustdocGuillaume Gomez-1/+4
2017-04-22Re-enable hoedown by defaultGuillaume Gomez-5/+9
2017-04-17Hoedown big comeback!Guillaume Gomez-1/+2
2017-04-06rustdoc: Use pulldown-cmark for Markdown HTML renderingOliver Middleton-2/+2
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-03-29Auto merge of #40338 - GuillaumeGomez:pulldown-switch, r=frewsxcv,steveklabnikbors-2/+2
Replace hoedown with pull in rustdoc cc @rust-lang/docs
2017-03-28Add missing markdown tagsGuillaume Gomez-2/+2
2017-03-28End of pulldown switch and remove completely hoedownGuillaume Gomez-1/+1
2017-03-25rustdoc to accept `#` at the start of a markdown file #40560projektir-5/+7
2017-02-13Add filename when running rustdoc --test on a markdown fileGuillaume Gomez-1/+2
2017-02-06Display correct filename with --test optionGuillaume Gomez-3/+3
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-2/+3