about summary refs log tree commit diff
path: root/src/librustdoc/markdown.rs
AgeCommit message (Collapse)AuthorLines
2021-10-04heading_level: u32 -> heading_offset: HeadingOffsetMukund Lakshman-2/+4
2021-10-04Change `Markdown(...)` to `Markdown { ... }`Mukund Lakshman-1/+10
2021-10-04librustdoc: Use correct heading levels.Mukund Lakshman-1/+1
- Avoid multiple <h1>s on a page. - The <h#> tags should follow a semantic hierarchy. - Cap at h6 (no h7)
2021-09-14Rename --display-warnings to --display-doctest-warningsGuillaume Gomez-2/+2
2021-07-22Move calls to test_main into one functionGuillaume Gomez-8/+5
2021-07-18Add --nocapture option to rustdocGuillaume Gomez-0/+3
2021-07-13Remove renaming of `test` crateJoshua Nelson-2/+2
This is leftover from when `doctest` used to be called `test`. Remove it now, it's unnecessary and makes the code harder to read.
2021-06-21Don't reallocate the crate name when running doctestsJoshua Nelson-1/+2
2020-11-15Make all rustdoc functions and structs crate-privateJoshua Nelson-2/+2
This gives warnings about dead code.
2020-11-07Allow making `RUSTC_BOOTSTRAP` conditional on the crate nameJoshua Nelson-3/+2
The main change is that `UnstableOptions::from_environment` now requires an (optional) crate name. If the crate name is unknown (`None`), then the new feature is not available and you still have to use `RUSTC_BOOTSTRAP=1`. In practice this means the feature is only available for `--crate-name`, not for `#![crate_name]`; I'm interested in supporting the second but I'm not sure how. Other major changes: - Added `Session::is_nightly_build()`, which uses the `crate_name` of the session - Added `nightly_options::match_is_nightly_build`, a convenience method for looking up `--crate-name` from CLI arguments. `Session::is_nightly_build()`should be preferred where possible, since it will take into account `#![crate_name]` (I think). - Added `unstable_features` to `rustdoc::RenderOptions` There is a user-facing change here: things like `RUSTC_BOOTSTRAP=0` no longer active nightly features. In practice this shouldn't be a big deal, since `RUSTC_BOOTSTRAP` is the opposite of stable and everyone uses `RUSTC_BOOTSTRAP=1` anyway. - Add tests Check against `Cheat`, not whether nightly features are allowed. Nightly features are always allowed on the nightly channel. - Only call `is_nightly_build()` once within a function - Use booleans consistently for rustc_incremental Sessions can't be passed through threads, so `read_file` couldn't take a session. To be consistent, also take a boolean in `write_file_header`.
2020-08-27Rename rustdoc/test -> rustdoc/doctestAleksey Kladov-1/+1
This modules contains the implementation of doctests, and not the tests of rustdoc itself. This name is confusing, so let's rename it to doctest for clarity.
2020-07-15rustdoc: Rename internal API fns to `into_string`Lzu Tao-2/+2
to avoid surprising listed in API guidelines.
2020-05-09End unification of exit codes in librustdocGuillaume Gomez-9/+4
2020-05-08Clean up rustdoc source codeGuillaume Gomez-27/+12
2020-04-23Create new rustdoc lint to check for code blocks tagsGuillaume Gomez-1/+1
2020-03-26Create output dir in rustdoc markdown renderTimothée Gerber-1/+6
2020-02-27use char instead of &str for single char patternsMatthias Krüger-1/+1
2020-02-04remove redundant imports (clippy::single_component_path_imports)Matthias Krüger-1/+0
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-3/+2
2020-01-02Normalize `syntax::edition` imports.Mazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-17/+22
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-1/+1
2019-09-11Rollup merge of #64072 - limira:patch-1, r=ollie27Mazdak Farrokhzad-1/+1
Replace file_stem by file_name in rustdoc markdown Before this PR, a file name like `some.file.md` will be output to a file named `some.html` with is not correct because the expected output file must be `some.file.html`
2019-09-04address rebase changesDario Gonzalez-1/+2
2019-09-03added feature gate enable-per-target-ignoresDario Gonzalez-1/+1
updated and augmented tests in html/markdown.rs
2019-09-02Replace file_stem by file_name in rustdoc markdownlimira-1/+1
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