add video and some fixes

This commit is contained in:
polv committed 2026-07-01 21:47:34 +07:00
1 parent 40edfe44e9
commit 05e45cd936
6 files changed
+546 -8

No files matched your search

+2 -6
View File
@@ -66,7 +66,7 @@ wss.on("connection", (ws) => {
const { min, sec } = m.groups;
const t = `${min}_${sec}`;
ts.push(t);
newContent += `![${line}](/${q_stem}/${t}.webp)\n`;
newContent += `![${line}](/images/${q_stem}/${t}.webp)\n`;
newContent += `${line}\n`;
newContent += `\n`;
isChanged = true;
@@ -129,10 +129,6 @@ wss.on("connection", (ws) => {
function loadMdFile(q) {
const q_stem = make_q_stem(q);
try {
mkdirSync(joinPath(MD_ROOT_DIR, q_stem));
} catch (e) {}
const filename = joinPath(MD_ROOT_DIR, `${q_stem}.md`);
try {
// create a blank md file if not exists
@@ -152,5 +148,5 @@ function make_q_stem(q) {
.replace(/\.[a-z0-9]+$/, "")
.replace(/\[.+?\]/g, "")
.trim()
.replace(/\s+/g, "_");
.replace(/[%\s]+/g, "_");
}