@sugarat/theme 0.3.1 → 0.3.2
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.
- package/node.js +2 -2
- package/package.json +1 -1
- package/src/utils/node/index.ts +1 -0
- package/src/utils/node/mdPlugins.ts +1 -1
package/node.js
CHANGED
|
@@ -227,7 +227,7 @@ function getFileBirthTime(url) {
|
|
|
227
227
|
return date;
|
|
228
228
|
}
|
|
229
229
|
function getTextSummary(text, count = 100) {
|
|
230
|
-
return text?.replace(/^#+\s+.*/, "")?.replace(/#/g, "")?.replace(/!\[.*?\]\(.*?\)/g, "")?.replace(/\[(.*?)\]\(.*?\)/g, "$1")?.replace(/\*\*(.*?)\*\*/g, "$1")?.split("\n")?.filter((v) => !!v)?.join("\n")?.replace(/>(.*)/, "")?.trim()?.slice(0, count);
|
|
230
|
+
return text?.replace(/^#+\s+.*/, "")?.replace(/#/g, "")?.replace(/!\[.*?\]\(.*?\)/g, "")?.replace(/\[(.*?)\]\(.*?\)/g, "$1")?.replace(/\*\*(.*?)\*\*/g, "$1")?.split("\n")?.filter((v) => !!v)?.join("\n")?.replace(/>(.*)/, "")?.replace(/</g, "<").replace(/>/g, ">")?.trim()?.slice(0, count);
|
|
231
231
|
}
|
|
232
232
|
function aliasObjectToArray(obj) {
|
|
233
233
|
return Object.entries(obj).map(([find, replacement]) => ({
|
|
@@ -303,7 +303,7 @@ function getMarkdownPlugins(cfg) {
|
|
|
303
303
|
const { MermaidMarkdown } = _require("vitepress-plugin-mermaid");
|
|
304
304
|
markdownPlugin.push(MermaidMarkdown);
|
|
305
305
|
}
|
|
306
|
-
if (cfg
|
|
306
|
+
if (cfg?.taskCheckbox !== false) {
|
|
307
307
|
markdownPlugin.push(taskCheckboxPlugin(typeof cfg?.taskCheckbox === "boolean" ? {} : cfg?.taskCheckbox));
|
|
308
308
|
}
|
|
309
309
|
if (cfg?.timeline !== false) {
|
package/package.json
CHANGED
package/src/utils/node/index.ts
CHANGED
|
@@ -23,7 +23,7 @@ export function getMarkdownPlugins(cfg?: Partial<Theme.BlogConfig>) {
|
|
|
23
23
|
markdownPlugin.push(MermaidMarkdown)
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
if (cfg
|
|
26
|
+
if (cfg?.taskCheckbox !== false) {
|
|
27
27
|
markdownPlugin.push(taskCheckboxPlugin(typeof cfg?.taskCheckbox === 'boolean' ? {} : cfg?.taskCheckbox))
|
|
28
28
|
}
|
|
29
29
|
|