🐛 D107 · 修复markdownToHtml函数JS语法错误导致页面无响应

This commit is contained in:
root 2026-05-20 22:59:20 +08:00
parent 6ce011086c
commit 0f53854bd2

View File

@ -796,12 +796,9 @@ function markdownToHtml(t) {
h = h.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>'); h = h.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>');
h = h.replace(/```([\s\S]*?)```/g, '<pre>$1</pre>'); h = h.replace(/```([\s\S]*?)```/g, '<pre>$1</pre>');
h = h.replace(/`([^`]+)`/g, '<code>$1</code>'); h = h.replace(/`([^`]+)`/g, '<code>$1</code>');
h = h.replace(/ h = h.replace(/\n/g, '<br>');
/g, '<br>');
return h; return h;
} }// ===== 登录 =====
// ===== 登录 =====
async function handleLogin() { async function handleLogin() {
const u = document.getElementById('login-user').value.trim(); const u = document.getElementById('login-user').value.trim();
const p = document.getElementById('login-pass').value; const p = document.getElementById('login-pass').value;