Skip to content

Commit

Permalink
chore: add document for vue
Browse files Browse the repository at this point in the history
  • Loading branch information
PBK-B committed Dec 12, 2024
1 parent 9342edf commit cf67926
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,26 @@ Typescript is supported via Javascript and Jsx lexers. If you are using Javascri
}
```

#### Vue

```js
{
// Vue needs to parse its syntax through both JavascriptLexer and HTMLLexer
vue: [
{
lexer: 'JavascriptLexer',
functions: ['t', '$t'], // Array of functions to match
namespaceFunctions: ['useTranslation', 'withTranslation'],
},
{
lexer: 'HTMLLexer',
functions: ['t', '$t'], // Array of functions to match
vueBindAttr: true, // enable vue template syntax bind attribute
},
],
}
```

#### Custom lexers

You can provide function instead of string as a custom lexer.
Expand Down

0 comments on commit cf67926

Please sign in to comment.