fix: limit tagName to whole world
This commit is contained in:
parent
2c9e783817
commit
f7b656443d
|
@ -1,5 +1,5 @@
|
|||
function mark(text) {
|
||||
return text.replace(/<(h\d|header|p|a)([\s\S]*?)>([\s\S]+?)<\/\1>/gi, function ($0, $1, $2, $3) {
|
||||
return text.replace(/<(h\d|header|p|a)(\b[\s\S]*?)>([\s\S]+?)<\/\1>/gi, function ($0, $1, $2, $3) {
|
||||
const suffix = isTranslation($3) ? 'result' : 'origin=off';
|
||||
return `<${$1} translation-${suffix} ${$2}>${$3}</${$1}>`;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue