I am using babel-plugin-transform-react-pug
however babel-sublime
package doesn’t recognize the pug syntax,
so i installed pug package and define the following syntax:
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: JS with Pug
file_extensions:
- pug.js
scope: source.js.pug
contexts:
main:
- match: ""
push: scope:source.js
with_prototype:
- match: "pug`"
push:
- meta_content_scope: text.pug.embedded.js
- include: 'scope:text.pug'
- match: "`"
pop: true
it managed to highlight the pug part of my code:
but failed to end the pug and resume to js: