Basic cours support #44
2 changed files with 2 additions and 1 deletions
|
@ -212,7 +212,7 @@ pub fn read_file(filename: &str, expected_file: TypeFileMetadata) -> Option<File
|
||||||
|
|
||||||
/// Deserialize metadata based on a type
|
/// Deserialize metadata based on a type
|
||||||
fn deserialize_metadata<T: Default + serde::de::DeserializeOwned>(text: &str) -> T {
|
fn deserialize_metadata<T: Default + serde::de::DeserializeOwned>(text: &str) -> T {
|
||||||
serde_yaml::from_str(text.trim_matches(&['-', '\n'] as &[_])).unwrap_or_default()
|
serde_yaml::from_str(text.trim().trim_matches(&['-'] as &[_])).unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fetch metadata from AST
|
/// Fetch metadata from AST
|
||||||
|
|
|
@ -9,6 +9,7 @@ window.addEventListener("load", () => {
|
||||||
/* Aliases of langs */
|
/* Aliases of langs */
|
||||||
const aliases = {
|
const aliases = {
|
||||||
bash: ["fish"],
|
bash: ["fish"],
|
||||||
|
pascal: ["pseudocode"],
|
||||||
};
|
};
|
||||||
for (const lang in aliases) {
|
for (const lang in aliases) {
|
||||||
hljs.registerAliases(aliases[lang], { languageName: lang });
|
hljs.registerAliases(aliases[lang], { languageName: lang });
|
||||||
|
|
Loading…
Reference in a new issue