提交 c07bf9de 编写于 作者: M Martin Aeschlimann

[decorators] Single quotes in the contentText make the content not being...

[decorators] Single quotes in the contentText make the content not being rendered at all. Fixes  #19922
上级 e1bb3ad6
...@@ -311,7 +311,7 @@ class DecorationRenderHelper { ...@@ -311,7 +311,7 @@ class DecorationRenderHelper {
} }
if (typeof opts.contentText === 'string') { if (typeof opts.contentText === 'string') {
const truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line const truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line
const escaped = truncated.replace(/'\\/g, '\\$&'); const escaped = truncated.replace(/['\\]/g, '\\$&');
cssTextArr.push(strings.format(this._CSS_MAP.contentText, escaped)); cssTextArr.push(strings.format(this._CSS_MAP.contentText, escaped));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册