Skip to content

Commit c418bef

Browse files
committed
fix(language-service): handle references of tag attributes correctly
1 parent edf161a commit c418bef

File tree

1 file changed

+4
-1
lines changed
  • packages/language-service/lib/plugins

1 file changed

+4
-1
lines changed

packages/language-service/lib/plugins/data.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ export function loadModelModifiersData(lang: string): html.HTMLDataV1 {
154154
function resolveReferences(data: html.HTMLDataV1) {
155155
locale ??= require('../../data/locale.json');
156156

157-
for (const item of [...data.globalAttributes ?? [], ...data.tags ?? []]) {
157+
for (const item of [
158+
...data.globalAttributes ?? [],
159+
...data.tags?.flatMap((tag) => [tag, ...tag.attributes]) ?? [],
160+
]) {
158161
if (typeof item.references === 'string') {
159162
const relativeUrl = item.references as string;
160163
item.references = locale.map(({ name, url }) => ({

0 commit comments

Comments
 (0)