mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-11 21:27:31 +08:00
markdown 调试信息中的错误日志删除
This commit is contained in:
@@ -268,12 +268,10 @@ export function stripMarkdownLength(text, length) {
|
|||||||
|
|
||||||
// 朴素文本带贴吧表情
|
// 朴素文本带贴吧表情
|
||||||
export function stripMarkdownWithTiebaMoji(text, length){
|
export function stripMarkdownWithTiebaMoji(text, length){
|
||||||
console.error(text)
|
|
||||||
if (!text) return ''
|
if (!text) return ''
|
||||||
|
|
||||||
// Markdown 转成纯文本
|
// Markdown 转成纯文本
|
||||||
const plain = stripMarkdown(text)
|
const plain = stripMarkdown(text)
|
||||||
console.error(plain)
|
|
||||||
// 替换 :tieba123: 为 <img>
|
// 替换 :tieba123: 为 <img>
|
||||||
const withEmoji = plain.replace(/:tieba(\d+):/g, (match, num) => {
|
const withEmoji = plain.replace(/:tieba(\d+):/g, (match, num) => {
|
||||||
const key = `tieba${num}`
|
const key = `tieba${num}`
|
||||||
|
|||||||
Reference in New Issue
Block a user