Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
d3ec92e16e7e78c273c0f996cad5122ce5a6cdd6
rust/tests/rustdoc/table-in-docblock.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
351 B
Rust
Raw Normal View History

Add tests to ensure that <table> don't break doc blocks width anymore
2021-09-08 15:09:47 +02:00
#![crate_name = "foo"]
// @has foo/struct.Foo.html
// @count - '//*[@class="docblock"]/div/table' 2
rustdoc: Fix incorrect usage of `@!has` and `@!matches` `@!has` (and `@!matches`) with two arguments used to treat the second argument as a literal string of HTML code. Now, that feature has been renamed into `@!hasraw` (and `@!matchesraw`), and the arity-2 `@!has` version is an error. These uses thought the second argument was being treated as an XPath, as with the arity-3 version, but in fact was being treated as literal HTML. Because these were checking for the *absence* of the string, the tests silently did nothing -- an XPath string won't ever be showing up in the test's generated HTML!
2022-08-13 00:56:16 -04:00
// @!has - '//*[@class="docblock"]/table' ''
Add tests to ensure that <table> don't break doc blocks width anymore
2021-09-08 15:09:47 +02:00
/// | hello | hello2 |
/// | ----- | ------ |
/// | data | data2 |
pub struct Foo;
impl Foo {
/// | hello | hello2 |
/// | ----- | ------ |
/// | data | data2 |
pub fn foo(&self) {}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 557ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API