mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Implements experimental inline suggestion hints. (#171846)
* Implements experimental inline suggestion hints. * Fixes lint issue. * Removes content widget on dispose
This commit is contained in:
committed by
GitHub
parent
1f6c0b8780
commit
afa19380da
@@ -1818,8 +1818,23 @@ export function h(tag: string, ...args: [] | [attributes: { $: string } & Partia
|
||||
el.id = match.groups['id'];
|
||||
}
|
||||
|
||||
const classNames = [];
|
||||
if (match.groups['class']) {
|
||||
el.className = match.groups['class'].replace(/\./g, ' ').trim();
|
||||
for (const className of match.groups['class'].split('.')) {
|
||||
if (className !== '') {
|
||||
classNames.push(className);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (attributes.className !== undefined) {
|
||||
for (const className of attributes.className.split('.')) {
|
||||
if (className !== '') {
|
||||
classNames.push(className);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (classNames.length > 0) {
|
||||
el.className = classNames.join(' ');
|
||||
}
|
||||
|
||||
const result: Record<string, HTMLElement> = {};
|
||||
@@ -1842,7 +1857,9 @@ export function h(tag: string, ...args: [] | [attributes: { $: string } & Partia
|
||||
}
|
||||
|
||||
for (const [key, value] of Object.entries(attributes)) {
|
||||
if (key === 'style') {
|
||||
if (key === 'className') {
|
||||
continue;
|
||||
} else if (key === 'style') {
|
||||
for (const [cssKey, cssValue] of Object.entries(value)) {
|
||||
el.style.setProperty(
|
||||
camelCaseToHyphenCase(cssKey),
|
||||
|
||||
Reference in New Issue
Block a user