forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: make langstring parsing more robust
This changes the parsing of the language string in code examples so that unrecognized examples are not considered Rust code. This was, for example, the case when a code example was marked `sh` for shell code. This relieves authors of having to mark those samples as `notrust`. Also adds recognition of the positive marker `rust`. By default, unmarked examples are still considered rust. If any rust-specific tags are seen, code is considered rust unless marked as "notrust". Adds test cases for the detection logic.
- Loading branch information
Showing
1 changed file
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3fef7a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+, thanks!