Skip to content

Commit

Permalink
fix(language-service): handle references of tag attributes correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
KazariEX committed Dec 18, 2024
1 parent edf161a commit c418bef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/language-service/lib/plugins/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ export function loadModelModifiersData(lang: string): html.HTMLDataV1 {
function resolveReferences(data: html.HTMLDataV1) {
locale ??= require('../../data/locale.json');

for (const item of [...data.globalAttributes ?? [], ...data.tags ?? []]) {
for (const item of [
...data.globalAttributes ?? [],
...data.tags?.flatMap((tag) => [tag, ...tag.attributes]) ?? [],
]) {
if (typeof item.references === 'string') {
const relativeUrl = item.references as string;
item.references = locale.map(({ name, url }) => ({
Expand Down

0 comments on commit c418bef

Please sign in to comment.