Skip to content

Commit 0beb101

Browse files
author
Anirudh Sanjeev
committed
Add syntax tests
1 parent 4d3ec52 commit 0beb101

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

syntax_test_basic.vue

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!-- SYNTAX TEST "Packages/User/vue-syntax-highlight/Vue Component.sublime-syntax" -->
2+
3+
<template>
4+
<a @on.click="foo()">Click Me</a>
5+
<!-- ^ text.html.vue -->
6+
<!-- ^ source.js -->
7+
<span v-text="foo * 10 + 'hi'" :id="foo + 'baz'">Hello {{ world }}</span>
8+
<!-- ^ source.js -->
9+
<!-- ^ meta.string.js -->
10+
<!-- ^ source.js -->
11+
<!-- ^ meta.string.js -->
12+
<!-- ^ source.js -->
13+
14+
</template>
15+
16+
<script>
17+
export default {
18+
// ^ source.js
19+
// ^ meta.export.js
20+
21+
function () {
22+
23+
}
24+
}
25+
</script>
26+
27+
<style>
28+
body {
29+
/* ^ source.css */
30+
background-color: yellow;
31+
/* ^ meta.block.css */
32+
/* ^ meta.property.value.css */
33+
}
34+
</style>

syntax_test_langs.vue

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- SYNTAX TEST "Packages/User/vue-syntax-highlight/Vue Component.sublime-syntax" -->
2+
3+
<style lang="stylus">
4+
font-stack = Helvetica, sans-serif
5+
// ^ source.stylus
6+
primary-color = #999
7+
body
8+
font 100% font-stack
9+
color primary-color
10+
</style>
11+
12+
<style lang="scss">
13+
@import '~foo';
14+
// ^ source.scss
15+
16+
a {
17+
color: red;
18+
}
19+
</style>
20+
21+
<style lang="sass">
22+
@import '~foo'
23+
// ^ source.sass
24+
a
25+
color: red
26+
</style>
27+
28+
<template lang="pug">
29+
div.app
30+
h1.title This is the app
31+
// ^ source.pug
32+
comp-a(foo="bar", :a=1)
33+
comp-b(bar="baz", :a=234)
34+
</template>
35+
36+
<script lang="coffee">
37+
module.exports =
38+
data: ->
39+
msg: 'Hello from coffee!'
40+
# ^ source.coffee
41+
</script>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy