mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 14:51:15 +00:00
Fix documentation preview and hightlighting of .60 code with nightly rustdoc
rustdoc changed the html generated. The code used to be in a `<code>`, now it is in a `<pre>` So this should wotk with both stable rust and nightly rust
This commit is contained in:
parent
e24ff2bff4
commit
bdeb64c518
2 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@
|
|||
const rustDoc = document.querySelector('meta[name="generator"]')?.content == "rustdoc";
|
||||
if (rustDoc) {
|
||||
// Only highlight .60 blocks, leave the others to rustdoc
|
||||
for (dot60Block of document.querySelectorAll("pre code.language-60")) {
|
||||
for (dot60Block of document.querySelectorAll(".language-60")) {
|
||||
hljs.highlightElement(dot60Block)
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
await sixtyfps.default();
|
||||
|
||||
var elements = document.querySelectorAll("code.language-60, div.highlight-60 div");
|
||||
var elements = document.querySelectorAll("code.language-60, pre.language-60, div.highlight-60 div");
|
||||
for (var i = 0; i < elements.length; ++i) {
|
||||
let source = elements[i].innerText;
|
||||
let div = document.createElement("div");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue