Skip to content

Commit

Permalink
better pug fontification
Browse files Browse the repository at this point in the history
  • Loading branch information
fxbois committed Dec 27, 2020
1 parent cd9f0af commit 951ad63
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions issues/1165.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template lang="pug">
div.test
a.link {{ a }}
</template>

<script>
export default {
data() {
return {
a: 4
};
},
methods: {
someMethod() {
this.logSomething();
},
logSomething() {
this.asdasdasd();
a = 4;
return;
}
}
};
</script>

<style lang="scss">
.con {
.link {
color: red;
}
}
</style>
3 changes: 2 additions & 1 deletion web-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,8 @@ shouldn't be moved back.)")

(defvar web-mode-pug-font-lock-keywords
(list
'("#[[:alnum:]-]+" 0 'web-mode-css-selector-face)
'("^[ \t]*\\(#?[[:alnum:].-]+\\)" 1 'web-mode-css-selector-face)
;;'("^[ \t]*\\(#[[:alnum:]-]+\\)" 0 'web-mode-css-selector-face)
'(" \\([@:]?\\sw+[ ]?=\\)" 1 'web-mode-param-name-face)
))

Expand Down

0 comments on commit 951ad63

Please sign in to comment.