提交 25eb3629 编写于 作者: N Noj Vek

Fix bug in decorationRenderHelper

getCSSTextForModelDecorationContentClassName will not escape ' in contentText since its escaping " rather than '

_CSS_MAPcontentText: 'content:\'{0}\';' uses single apostrophe so we need to escape ' rather than "

This is a bug that was always present and breaks inlineValueDebugging feature I am working on #16129
上级 d4d5a23f
......@@ -310,7 +310,7 @@ class DecorationRenderHelper {
cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27')));
}
if (typeof opts.contentText !== 'undefined') {
let escaped = opts.contentText.replace(/\"/g, '\\\"');
const escaped = opts.contentText.replace(/'/g, '\\\'');
cssTextArr.push(strings.format(this._CSS_MAP.contentText, escaped));
}
DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册