Merge pull request #2557 from ehuss/fix-playground-edition
Fix playground edition detection
This commit is contained in:
commit
19146c403e
1 changed files with 5 additions and 5 deletions
|
|
@ -111,11 +111,11 @@ function playground_text(playground, hidden = true) {
|
|||
let text = playground_text(code_block);
|
||||
let classes = code_block.querySelector('code').classList;
|
||||
let edition = "2015";
|
||||
if(classes.contains("edition2018")) {
|
||||
edition = "2018";
|
||||
} else if(classes.contains("edition2021")) {
|
||||
edition = "2021";
|
||||
}
|
||||
classes.forEach(className => {
|
||||
if (className.startsWith("edition")) {
|
||||
edition = className.slice(7);
|
||||
}
|
||||
});
|
||||
var params = {
|
||||
version: "stable",
|
||||
optimize: "0",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue