vitepress 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -34486,16 +34486,11 @@ async function highlight(theme, options, logger = console) {
|
|
|
34486
34486
|
defaultHighlightLang: defaultLang = "txt",
|
|
34487
34487
|
codeTransformers: userTransformers = []
|
|
34488
34488
|
} = options;
|
|
34489
|
-
const usingTwoslash = userTransformers.some(
|
|
34490
|
-
({ name }) => name === "@shikijs/vitepress-twoslash"
|
|
34491
|
-
);
|
|
34492
34489
|
const highlighter = await createHighlighter({
|
|
34493
34490
|
themes: typeof theme === "object" && "light" in theme && "dark" in theme ? [theme.light, theme.dark] : [theme],
|
|
34494
34491
|
langs: [
|
|
34495
34492
|
...options.languages || [],
|
|
34496
|
-
...Object.values(options.languageAlias || {})
|
|
34497
|
-
// patch for twoslash - https://github.com/vuejs/vitepress/issues/4334
|
|
34498
|
-
...usingTwoslash ? Object.keys((await import('shiki')).bundledLanguages) : []
|
|
34493
|
+
...Object.values(options.languageAlias || {})
|
|
34499
34494
|
],
|
|
34500
34495
|
langAlias: options.languageAlias
|
|
34501
34496
|
});
|
|
@@ -34508,6 +34503,12 @@ async function highlight(theme, options, logger = console) {
|
|
|
34508
34503
|
}
|
|
34509
34504
|
return true;
|
|
34510
34505
|
}
|
|
34506
|
+
const internal = highlighter.getInternalContext();
|
|
34507
|
+
const getLanguage = internal.getLanguage;
|
|
34508
|
+
internal.getLanguage = (name) => {
|
|
34509
|
+
loadLanguage(name);
|
|
34510
|
+
return getLanguage.call(internal, name);
|
|
34511
|
+
};
|
|
34511
34512
|
await options?.shikiSetup?.(highlighter);
|
|
34512
34513
|
const transformers = [
|
|
34513
34514
|
transformerNotationDiff(),
|
|
@@ -48541,7 +48542,7 @@ async function generateSitemap(siteConfig) {
|
|
|
48541
48542
|
});
|
|
48542
48543
|
}
|
|
48543
48544
|
|
|
48544
|
-
var version = "1.4.
|
|
48545
|
+
var version = "1.4.5";
|
|
48545
48546
|
|
|
48546
48547
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
48547
48548
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
package/dist/node/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getDefaultExportFromCjs, u as c, n as disposeMdItInstance, v as clearCache, l as init, b as build, o as serve, w as version, q as createServer } from './chunk-
|
|
1
|
+
import { t as getDefaultExportFromCjs, u as c, n as disposeMdItInstance, v as clearCache, l as init, b as build, o as serve, w as version, q as createServer } from './chunk-D0czDMtb.js';
|
|
2
2
|
import { createLogger } from 'vite';
|
|
3
3
|
import 'path';
|
|
4
4
|
import 'url';
|
package/dist/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizePath } from 'vite';
|
|
2
2
|
export { loadEnv } from 'vite';
|
|
3
|
-
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, p as postcssPrefixSelector } from './chunk-
|
|
4
|
-
export { S as ScaffoldThemeType, b as build, q as createServer, a as defineConfig, e as defineConfigWithTheme, d as defineLoader, n as disposeMdItInstance, l as init, i as mergeConfig, r as resolveConfig, k as resolvePages, j as resolveSiteData, h as resolveUserConfig, s as scaffold, o as serve } from './chunk-
|
|
3
|
+
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, p as postcssPrefixSelector } from './chunk-D0czDMtb.js';
|
|
4
|
+
export { S as ScaffoldThemeType, b as build, q as createServer, a as defineConfig, e as defineConfigWithTheme, d as defineLoader, n as disposeMdItInstance, l as init, i as mergeConfig, r as resolveConfig, k as resolvePages, j as resolveSiteData, h as resolveUserConfig, s as scaffold, o as serve } from './chunk-D0czDMtb.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|