rust/src/librustdoc
bors afaa406465 Auto merge of #51803 - lucasem:rustdoc-code-hash-escape, r=GuillaumeGomez
rustdoc codeblock hash escape

So that docstring text such as the following (in a code block) can be created ergonomically:

```rust
let s = "
    foo
    # bar
    baz
";
```

Such code in a docstring hide the <code>&nbsp;&nbsp;&nbsp;&nbsp;# bar</code> line.

Previously, using two consecutive hashes <code>&nbsp;&nbsp;&nbsp;&nbsp;## bar</code> would turn the line into _shown_ `# bar`, losing the leading whitespace. A line of code like <code>&nbsp;&nbsp;&nbsp;&nbsp;# bar</code> (such as in the example above) **could not be represented** in the docstring text.

This commit makes the two consecutive hashes not also trim the leading whitespace — the two hashes simply **escape** into a single hash and do not hide the line, leaving the rest of that line unaffected. The new docstring text to achieve the above code block is:

```rust
/// ```
/// let s = "
///     foo
///     ## bar
///     baz
/// ";
/// ```
```
2018-07-04 20:21:01 +00:00
..
clean Auto merge of #51611 - QuietMisdreavus:slippery-macros, r=ollie27 2018-07-04 18:15:14 +00:00
html Auto merge of #51803 - lucasem:rustdoc-code-hash-escape, r=GuillaumeGomez 2018-07-04 20:21:01 +00:00
passes Add doc keyword support 2018-06-04 09:51:41 +02:00
Cargo.toml Minify css 2018-06-25 23:28:20 +02:00
core.rs Auto merge of #51678 - Zoxc:combine-lints, r=estebank 2018-06-26 14:18:13 +00:00
doctree.rs call it hir::VisibilityKind instead of hir::Visibility_:* 2018-07-01 11:05:10 -07:00
externalfiles.rs replace error/warning println with structured diag 2018-05-14 11:03:22 -05:00
fold.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
lib.rs Haiku: set stack size to 16 MB on Haiku, use 32 MB on other platforms 2018-06-24 11:14:22 +02:00
markdown.rs replace error/warning println with structured diag 2018-05-14 11:03:22 -05:00
plugins.rs rustc_back: move dynamic_lib to rustc_metadata. 2017-12-04 18:25:29 +02:00
README.md Move librustdoc readme to rustc guide 2018-03-12 20:09:50 -05:00
test.rs Use Idents for associated item definitions in HIR 2018-06-28 11:04:50 +03:00
theme.rs replace error/warning println with structured diag 2018-05-14 11:03:22 -05:00
visit_ast.rs Auto merge of #51611 - QuietMisdreavus:slippery-macros, r=ollie27 2018-07-04 18:15:14 +00:00
visit_lib.rs Remove is_import field 2018-06-03 11:29:44 -06:00

For more information about how librustdoc works, see the rustc guide.