tijiao
This commit is contained in:
@@ -243,7 +243,9 @@ export default {
|
||||
str = str.replace(regex, function (match) {
|
||||
// 提取出方括号中的内容,并进行匹配
|
||||
const content = match.slice(1, match.length - 1); // 去掉方括号
|
||||
|
||||
// 这个需要程序去判断所以需要告诉我满足哪些条件的标蓝
|
||||
// 上标中 只有 * # & 纯数字 纯数字逗号 纯数字逗号和空格 ỻ 标蓝
|
||||
|
||||
// 判断是否符合条件,纯数字、逗号后有空格、连字符
|
||||
if (/^\d+$/.test(content) || /, ?/.test(content) || /–/.test(content)) {
|
||||
return `<blue>${match}</blue>`; // 如果符合条件则加上蓝色标签
|
||||
|
||||
Reference in New Issue
Block a user