Skip to content

Syntax Tests #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions syntax_test_basic.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- SYNTAX TEST "Packages/User/vue-syntax-highlight/Vue Component.sublime-syntax" -->

<template>
<a @on.click="foo()">Click Me</a>
<!-- ^ text.html.vue -->
<!-- ^ source.js -->
<span v-text="foo * 10 + 'hi'" :id="foo + 'baz'">Hello {{ world }}</span>
<!-- ^ source.js -->
<!-- ^ meta.string.js -->
<!-- ^ source.js -->
<!-- ^ meta.string.js -->
<!-- ^ source.js -->

</template>

<script>
export default {
// ^ source.js
// ^ meta.export.js

function () {

}
}
</script>

<style>
body {
/* ^ source.css */
background-color: yellow;
/* ^ meta.block.css */
/* ^ meta.property.value.css */
}
</style>
41 changes: 41 additions & 0 deletions syntax_test_langs.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- SYNTAX TEST "Packages/User/vue-syntax-highlight/Vue Component.sublime-syntax" -->

<style lang="stylus">
font-stack = Helvetica, sans-serif
// ^ source.stylus
primary-color = #999
body
font 100% font-stack
color primary-color
</style>

<style lang="scss">
@import '~foo';
// ^ source.scss

a {
color: red;
}
</style>

<style lang="sass">
@import '~foo'
// ^ source.sass
a
color: red
</style>

<template lang="pug">
div.app
h1.title This is the app
// ^ source.pug
comp-a(foo="bar", :a=1)
comp-b(bar="baz", :a=234)
</template>

<script lang="coffee">
module.exports =
data: ->
msg: 'Hello from coffee!'
# ^ source.coffee
</script>