1
Fork 0

Improve documentation, add checks for themes option arguments, make sure the themes file names are js compatible

This commit is contained in:
Guillaume Gomez 2019-08-21 15:48:26 +02:00
parent 6f2d1f51eb
commit bbfd63c89a
3 changed files with 12 additions and 3 deletions

View file

@ -645,7 +645,7 @@ themePicker.onblur = handleThemeButtonsBlur;
themes.appendChild(but);
}});"#,
themes.iter()
.map(|s| format!("\"{}\"", s))
.map(|s| format!("\"{}\"", s.replace("\\", "\\\\").replace("\"", "\\\"")))
.collect::<Vec<String>>()
.join(","));
write(cx.dst.join(&format!("theme{}.js", cx.shared.resource_suffix)),