feat: add picture mode

This commit is contained in:
葛胤池 2022-12-10 19:45:54 +08:00
parent 6f0e62b54d
commit 70044eb6c0
21 changed files with 663 additions and 371 deletions

9
utils/text.js Normal file
View file

@ -0,0 +1,9 @@
/**
* 判断一段markdown文档中是否包含代码
* @param text
*/
export function codeExists (text = '') {
let regex = /^[\s\S]*\$.*\$[\s\S]*/
return regex.test(text)
}