Merge branch 'main' into cours
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-12-22 15:57:48 +01:00
commit 5009626ef3
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 2 additions and 1 deletions

View file

@ -212,7 +212,7 @@ pub fn read_file(filename: &str, expected_file: TypeFileMetadata) -> Option<File
/// Deserialize metadata based on a type
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

View file

@ -9,6 +9,7 @@ window.addEventListener("load", () => {
/* Aliases of langs */
const aliases = {
bash: ["fish"],
pascal: ["pseudocode"],
};
for (const lang in aliases) {
hljs.registerAliases(aliases[lang], { languageName: lang });