feat: markdown rendering + dark mode input fixes + DM icon align
- Add marked dependency; render post/reply content and signature via
marked.parse (matches upstream). lib/markdown.js helper + CSS for
code/pre/blockquote/tables in glass theme
- Fix hardcoded #e2e8f0 white inputs in dark mode: NewPost title/content,
Modals report select, ReplyList, AdminForumSettings/Links/Users/Logs
- DM button: replace ✉️ emoji with upstream SVG chat bubble icon
This commit is contained in:
1 parent
9eed101caa
commit
156e178160
14 files changed
+98
-22
No files matched your search
@@ -0,0 +1,12 @@
|
||||
// Markdown 渲染工具(对齐上游 marked 行为)
|
||||
import { marked } from 'marked';
|
||||
|
||||
// 渲染 markdown 为 HTML;失败时回退为纯文本换行
|
||||
export function renderMarkdown(text) {
|
||||
if (!text) return '';
|
||||
try {
|
||||
return marked.parse(text);
|
||||
} catch {
|
||||
return text.replace(/\n/g, '<br>');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user