Skip to content

Commit

Permalink
fix: use more explicit v-bind syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
PBK-B committed Dec 12, 2024
1 parent cf67926 commit b616178
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lexers/html-lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class HTMLLexer extends BaseLexer {
// traverse all tags to filter bind attribute
$('*').each((index, node) => {
const attributes = node.attributes.filter(
(item) => item.name.startsWith(':') || item.name.startsWith('v-')
(item) => item.name.startsWith(':') || item.name.startsWith('v-bind:')
)
if (attributes.length > 0) {
// there are calculation attributes.
Expand Down
2 changes: 1 addition & 1 deletion test/lexers/html-lexer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('HTMLLexer', () => {
<button :aria-label="t('b_a_l', 'button aria label')">
button label
</button>
<button v-aria-label="$t('button v-bind aria label')">
<button v-bind:aria-label="$t('button v-bind aria label')">
button label form v-bind
</button>
</template>
Expand Down

0 comments on commit b616178

Please sign in to comment.