-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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.
saw approval from alexcrichton
at skade@3fef7a7
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.
merging skade/rust/rustdoc-robust-langstring-parsing = 3fef7a7 into auto
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.
skade/rust/rustdoc-robust-langstring-parsing = 3fef7a7 merged ok, testing candidate = b981add
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.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/6036
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/6034
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/5130
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/5138
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/6134
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/5222
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/5230
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/6136
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/5221
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/5227
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/5287
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/3023
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/6126
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/5222
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/5237
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.
fast-forwarding master to auto = b981add