Skip to content

Commit

Permalink
fix: set default lang of custom blocks to vue
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Aug 3, 2019
1 parent 630a49c commit 194d86a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/prettier/utils/parse-vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function processSFCCustomBlock({ attr, content, start, type }, options) {
const source = content.replace(/^((\/\/\n)|(\n))*/, '')
// As we have removed the starting `\n`, the offset of the custom block should `+ 1`
const offset = start + 1
const lang = (attr && attr.lang) || (options[type] && options[type].lang)
const lang = (attr && attr.lang) || (options[type] && options[type].lang) || 'vue'
return { source, offset, lang }
}

Expand Down

0 comments on commit 194d86a

Please sign in to comment.