Syntax token inspector doesn't show font-style changes caused by semantic...

Syntax token inspector doesn't show font-style changes caused by semantic highlighting. Fixes #123299
上级 05d22c68
......@@ -416,10 +416,17 @@ class InspectEditorTokensWidget extends Disposable implements IContentWidget {
const fontStyleLabels = new Array<HTMLElement | string>();
function addStyle(key: 'bold' | 'italic' | 'underline') {
let label: HTMLElement | string | undefined;
if (semantic && semantic[key]) {
fontStyleLabels.push($('span.tiw-metadata-semantic', undefined, key));
label = $('span.tiw-metadata-semantic', undefined, key);
} else if (tm && tm[key]) {
fontStyleLabels.push(key);
label = key;
}
if (label) {
if (fontStyleLabels.length) {
fontStyleLabels.push(' ');
}
fontStyleLabels.push(label);
}
}
addStyle('bold');
......@@ -428,7 +435,7 @@ class InspectEditorTokensWidget extends Disposable implements IContentWidget {
if (fontStyleLabels.length) {
elements.push($('tr', undefined,
$('td.tiw-metadata-key', undefined, 'font style' as string),
$('td.tiw-metadata-value', undefined, fontStyleLabels.join(' '))
$('td.tiw-metadata-value', undefined, ...fontStyleLabels)
));
}
return elements;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册