summary refs log tree commit diff
path: root/src/librustdoc/html/markdown.rs
AgeCommit message (Collapse)AuthorLines
2017-09-17Rollup merge of #44397 - GuillaumeGomez:codeblock-color, r=QuietMisdreavusTim Neumann-6/+39
Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
2017-09-15Auto merge of #43949 - GuillaumeGomez:compile_fail_stable, r=alexcrichtonbors-3/+1
Compile fail stable Since #30726, we never made the `compile_fail` flag nor the error code check stable. I think it's time to change this fact. r? @alexcrichton
2017-09-11Add arrow and improve displayGuillaume Gomez-22/+8
2017-09-11Add class for codeblocksGuillaume Gomez-6/+53
2017-09-05Test rustdoc unit tests.Mark Simulacrum-2/+4
Doc tests are temporarily disabled until next release cycle, since current beta Cargo errors on them. Upgrade should be smooth as the relevant tests are already fixed in this commit.
2017-09-01set compile_fail flag stableGuillaume Gomez-3/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-9/+9
Like #43008 (f668999), but _much more aggressive_.
2017-08-13Rollup merge of #43782 - nrc:include, r=GuillaumeGomezGuillaume Gomez-4/+4
Fix include! in doc tests By making the path relative to the current file. Fixes #43153 [breaking-change] - if you use `include!` inside a doc test, you'll need to change the path to be relative to the current file rather than relative to the working directory.
2017-08-10doc tests: use the filename from the source file for doc test programs, ↵Nick Cameron-4/+4
rather than a dummy name
2017-08-08Remove all usage of hoedown_buffer_putsGuillaume Gomez-2/+1
2017-08-07Remove \0 printingGuillaume Gomez-5/+5
2017-08-06Fix hoedown error in rustdocGuillaume Gomez-8/+7
2017-06-24Shorten some lines so this can pass the tidy checksPaul Woolcock-15/+19
2017-06-24add `allow_fail` test attributePaul Woolcock-18/+23
This change allows the user to add an `#[allow_fail]` attribute to tests that will cause the test to compile & run, but if the test fails it will not cause the entire test run to fail. The test output will show the failure, but in yellow instead of red, and also indicate that it was an allowed failure.
2017-06-23Removed as many "```ignore" as possible.kennytm-1/+1
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.
2017-05-06Allow # to appear in rustdoc code output.Mark Simulacrum-27/+48
"##" at the start of a trimmed rustdoc line is now cut to "#" and then shown. If the user wanted to show "##", they can type "###".
2017-04-22Fix line displayGuillaume Gomez-8/+4
2017-04-22Fix testsGuillaume Gomez-4/+5
2017-04-22Re-enable hoedown by defaultGuillaume Gomez-41/+294
2017-04-20Fix line display for hoedownGuillaume Gomez-3/+7
2017-04-17Hoedown big comeback!Guillaume Gomez-0/+191
2017-04-11Remove strings fulfilled with whitespaces in code block headersGuillaume Gomez-6/+7
2017-04-09Fix block code headers parsingGuillaume Gomez-8/+15
2017-04-06rustdoc: Use pulldown-cmark for Markdown HTML renderingOliver Middleton-461/+267
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-04Handle ordered lists as wellGuillaume Gomez-4/+12
2017-04-01Force footnote references to be sorted by idGuillaume Gomez-4/+6
2017-03-31Fix hard break issueGuillaume Gomez-2/+34
2017-03-30Fix multiple footnotes and improve testingGuillaume Gomez-21/+33
2017-03-29Add support for image, rules and footnotesGuillaume Gomez-28/+111
2017-03-28Improve function namingGuillaume Gomez-23/+22
2017-03-28Fix id generationGuillaume Gomez-47/+51
2017-03-28Fix plain_summary_line functionGuillaume Gomez-33/+51
2017-03-28Handle html in markdown as wellGuillaume Gomez-0/+3
2017-03-28Remove unneeded commentGuillaume Gomez-6/+0
2017-03-28Add a macro to improve codeGuillaume Gomez-117/+39
2017-03-28Add missing markdown tagsGuillaume Gomez-142/+239
2017-03-28End of pulldown switch and remove completely hoedownGuillaume Gomez-450/+211
2017-03-28Remains to fix tablesGuillaume Gomez-20/+74
2017-03-28Replace hoedown with pull in rustdocGuillaume Gomez-107/+308
2017-02-08Rollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, ↵Corey Farwell-3/+5
r=alexcrichton Display correct filename with --test option Fixes #39592. With the current files: ```rust pub mod foo; /// This is a Foo; /// /// ``` /// println!("baaaaaar"); /// ``` pub struct Foo; /// This is a Bar; /// /// ``` /// println!("fooooo"); /// ``` pub struct Bar; ``` ```rust // note the whitespaces /// ``` /// println!("foo"); /// ``` pub fn foo() {} ``` It displays: ``` ./build/x86_64-apple-darwin/stage1/bin/rustdoc --test test.rs running 3 tests test test.rs - line 13 ... ok test test.rs - line 5 ... ok test foo.rs - line 2 ... ok test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured ``` ``` ` `` println!("lol"); ` `` asdjnfasd asd ``` It displays: ``` ./build/x86_64-apple-darwin/stage1/bin/rustdoc --test foo.md running 1 test test <input> - line 3 ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured ``` r? @alexcrichton
2017-02-06Display correct filename with --test optionGuillaume Gomez-3/+5
2017-02-06std: Remove cfg(cargobuild) annotationsAlex Crichton-5/+0
These are all now no longer needed that we've only got rustbuild in tree.
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-3/+5
2017-02-03Move to my own hoedown repositoryGuillaume Gomez-17/+28
2017-02-03Add information in case of markdown block code test failureggomez-1/+6
2017-01-29Remove no longer necessary ctor checks in rustc_privacyVadim Petrochenkov-2/+0
2017-01-27Don't generate doc if doc comments only filled with 'white' charactersGuillaume Gomez-1/+2
2016-12-25Add unittestEsteban Küber-1/+12
2016-12-14Add `MarkdownHmtl` escape structEsteban Küber-4/+20
`MarkdownHtml` structs escape HTML tags from its text.
2016-10-31Changed most vec! invocations to use square bracesiirelu-1/+1
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.