We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 98abb22 + 66ded23 commit 19146c4Copy full SHA for 19146c4
src/theme/book.js
@@ -111,11 +111,11 @@ function playground_text(playground, hidden = true) {
111
let text = playground_text(code_block);
112
let classes = code_block.querySelector('code').classList;
113
let edition = "2015";
114
- if(classes.contains("edition2018")) {
115
- edition = "2018";
116
- } else if(classes.contains("edition2021")) {
117
- edition = "2021";
118
- }
+ classes.forEach(className => {
+ if (className.startsWith("edition")) {
+ edition = className.slice(7);
+ }
+ });
119
var params = {
120
version: "stable",
121
optimize: "0",
0 commit comments