Skip to content

Commit

Permalink
Update HTML DOM attribute "edition" to "data-edition"
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 23, 2020
1 parent 9b62936 commit 152d4e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/html/highlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
},
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc/codeblock-title.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 152d4e7

Please sign in to comment.