Skip to content

Commit 201cdef

Browse files
authored
improvement: i18n custom block default lang (#208)
1 parent b431eef commit 201cdef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/infuser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ function buildI18nTag (i18nBlock: SFCI18nBlock, options?: FormatOptions): string
9999
}
100100
if (lang !== 'json') {
101101
tag += ` lang="${escape(lang)}"`
102+
} else if (lang === undefined) { // default json
103+
tag += ` lang="json"`
102104
}
103105
tag += '>'
104106

0 commit comments

Comments
 (0)