Update HTML DOM attribute "edition" to "data-edition"

This commit is contained in:
Guillaume Gomez 2020-12-23 20:27:12 +01:00
parent 9b62936928
commit 152d4e74be
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ crate fn render_with_highlighting(
"<div class='information'><div class='tooltip {}'{}>ⓘ</div></div>",
class,
if let Some(edition_info) = edition_info {
format!(" edition=\"{}\"", edition_info)
format!(" data-edition=\"{}\"", edition_info)
} else {
String::new()
},

View File

@ -1098,7 +1098,7 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
content: "This example panics";
}
.tooltip.edition::after {
content: "This code runs with edition " attr(edition);
content: "This code runs with edition " attr(data-edition);
}
.tooltip::before {

View File

@ -3,7 +3,7 @@
// @has foo/fn.bar.html '//*[@class="tooltip compile_fail"]' "ⓘ"
// @has foo/fn.bar.html '//*[@class="tooltip ignore"]' "ⓘ"
// @has foo/fn.bar.html '//*[@class="tooltip should_panic"]' "ⓘ"
// @has foo/fn.bar.html '//*[@edition="2018"]' "ⓘ"
// @has foo/fn.bar.html '//*[@data-edition="2018"]' "ⓘ"
/// foo
///