Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol
diffdown.com
1# Parses Vue builtin directives
2
3<span v-text="msg"></span>
4
5==>
6
7Document(
8 Element(
9 OpenTag(StartTag, TagName, Attribute(AttributeName, Is, AttributeValue), EndTag),
10 CloseTag(StartCloseTag, TagName, EndTag)))
11
12# Parses Vue :is shorthand syntax
13
14<Component :is="view"></Component>
15
16==>
17
18Document(
19 Element(
20 OpenTag(StartTag, TagName, Attribute(AttributeName, Is, AttributeValue),EndTag),
21 CloseTag(StartCloseTag, TagName, EndTag)))
22
23# Parses Vue @click shorthand syntax
24
25<button @click="handler()">Click me</button>
26
27==>
28
29Document(
30 Element(
31 OpenTag(StartTag, TagName, Attribute(AttributeName, Is, AttributeValue), EndTag),
32 Text,
33 CloseTag(StartCloseTag, TagName, EndTag)))
34
35# Parses Vue @submit.prevent shorthand syntax
36
37<form @submit.prevent="onSubmit"></form>
38
39==>
40
41Document(
42 Element(
43 OpenTag(StartTag, TagName, Attribute(AttributeName, Is, AttributeValue), EndTag),
44 CloseTag(StartCloseTag, TagName, EndTag)))
45
46# Parses Vue Dynamic Arguments
47
48<a v-bind:[attributeName]="url">Link</a>
49
50==>
51
52Document(
53 Element(
54 OpenTag(StartTag, TagName, Attribute(AttributeName, Is, AttributeValue), EndTag),
55 Text,
56 CloseTag(StartCloseTag, TagName, EndTag)))