rust/src/librustdoc/html
bors d95d304861 Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514
[librustdoc] Only split lang string on `,`, ` `, and `\t`

Split markdown lang strings into tokens on `,`.

The previous behavior was to split lang strings into tokens on any
character that wasn't a `_`, `_`, or alphanumeric.

This is a potentially breaking change, so please scrutinize! See discussion in #78344.

I noticed some test cases that made me wonder if there might have been some reason for the original behavior:

```
t("{.no_run .example}", false, true, Ignore::None, true, false, false, false, v(), None);
t("{.sh .should_panic}", true, false, Ignore::None, false, false, false, false, v(), None);
t("{.example .rust}", false, false, Ignore::None, true, false, false, false, v(), None);
t("{.test_harness .rust}", false, false, Ignore::None, true, true, false, false, v(), None);
```

It seemed pretty peculiar to specifically test lang strings in braces, with all the tokens prefixed by `.`.

I did some digging, and it looks like the test cases were added way back in [this commit from 2014](3fef7a74ca) by `@skade.`

It looks like they were added just to make sure that the splitting was permissive, and aren't testing that those strings in particular are accepted.

Closes https://github.com/rust-lang/rust/issues/78344.
2021-02-26 00:17:22 +00:00
..
highlight rustdoc tweaking 2021-01-30 01:02:18 +00:00
markdown Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514 2021-02-26 00:17:22 +00:00
render Rollup merge of #82484 - bugadani:docfix, r=jyn514 2021-02-25 16:06:23 -05:00
static Rollup merge of #82313 - jsha:update-normalize-css, r=GuillaumeGomez 2021-02-25 14:34:02 +01:00
toc Format the world 2019-12-22 17:42:47 -05:00
escape.rs rustdoc tweaking 2021-01-30 01:02:18 +00:00
format.rs Restore linking to itself in implementors section of trait page 2021-02-06 21:05:41 +01:00
highlight.rs rustdoc tweaking 2021-01-30 01:02:18 +00:00
layout.rs rustdoc tweaking 2021-01-30 01:02:18 +00:00
markdown.rs Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514 2021-02-26 00:17:22 +00:00
mod.rs rustdoc: Note why rustdoc::html::markdown is public 2021-01-31 19:22:37 -08:00
sources.rs Make Clean take &mut DocContext 2021-02-16 21:25:14 -05:00
static_files.rs Make all rustdoc functions and structs crate-private 2020-11-15 11:21:12 -05:00
toc.rs clippy fixes for librustdoc 2021-01-01 21:19:10 +01:00