From d9dc315473fbae385692f20adaf5e49cbefabca6 Mon Sep 17 00:00:00 2001 From: ivorwei Date: Wed, 5 Jan 2022 16:37:10 +0800 Subject: [PATCH] fix(*): fix usage of lookbehind support --- src/core/hooks/BackgroundColor.js | 8 ++++---- src/core/hooks/Color.js | 8 ++++---- src/core/hooks/Sub.js | 6 +++--- src/core/hooks/Sup.js | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/core/hooks/BackgroundColor.js b/src/core/hooks/BackgroundColor.js index 2cee62f0a..06705fb33 100644 --- a/src/core/hooks/BackgroundColor.js +++ b/src/core/hooks/BackgroundColor.js @@ -23,8 +23,8 @@ export default class BackgroundColor extends SyntaxBase { // super(); // } - toHtml(whole, m1, m2) { - return `${m2}`; + toHtml(whole, leadingChar, m1, m2) { + return `${leadingChar}${m2}`; } makeHtml(str) { @@ -36,8 +36,8 @@ export default class BackgroundColor extends SyntaxBase { rule() { const ret = { - begin: isLookbehindSupported() ? '(?${m2}`; + toHtml(whole, leadingChar, m1, m2) { + return `${leadingChar}${m2}`; } makeHtml(str) { @@ -36,8 +36,8 @@ export default class Color extends SyntaxBase { rule() { const ret = { - begin: isLookbehindSupported() ? '(?${m1}`; + toHtml(whole, leadingChar, m1) { + return `${leadingChar}${m1}`; } makeHtml(str) { @@ -37,7 +37,7 @@ export default class Sub extends SyntaxBase { rule() { const ret = { - begin: isLookbehindSupported() ? '(?${m1}`; + toHtml(whole, leadingChar, m1) { + return `${leadingChar}${m1}`; } makeHtml(str) { @@ -37,7 +37,7 @@ export default class Sup extends SyntaxBase { rule() { const ret = { - begin: isLookbehindSupported() ? '(?