Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.

This commit is contained in:
becarta
2025-05-23 12:43:00 +02:00
parent f40db0f5c9
commit a544759a3b
11127 changed files with 1647032 additions and 0 deletions

36
node_modules/@astrojs/prism/dist/highlighter.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
import Prism from "prismjs";
import loadLanguages from "prismjs/components/index.js";
import { addAstro } from "./plugin.js";
const languageMap = /* @__PURE__ */ new Map([["ts", "typescript"]]);
function runHighlighterWithAstro(lang, code) {
if (!lang) {
lang = "plaintext";
}
let classLanguage = `language-${lang}`;
const ensureLoaded = (language) => {
if (language && !Prism.languages[language]) {
loadLanguages([language]);
}
};
if (languageMap.has(lang)) {
ensureLoaded(languageMap.get(lang));
} else if (lang === "astro") {
ensureLoaded("typescript");
addAstro(Prism);
} else {
ensureLoaded("markup-templating");
ensureLoaded(lang);
}
if (lang && !Prism.languages[lang]) {
console.warn(`Unable to load the language: ${lang}`);
}
const grammar = Prism.languages[lang];
let html = code;
if (grammar) {
html = Prism.highlight(code, grammar, lang);
}
return { classLanguage, html };
}
export {
runHighlighterWithAstro
};