|
| 1 | +--- |
| 2 | +timeout: |
| 3 | + parse: 5ms |
| 4 | + html: 5ms |
| 5 | + markdown: 5ms |
| 6 | +options: |
| 7 | + autoUnwrap: true |
| 8 | +--- |
| 9 | + |
| 10 | +## Input |
| 11 | + |
| 12 | +```md |
| 13 | +::page-section |
| 14 | + :::page-section |
| 15 | + #tagline |
| 16 | + {{ $doc.snippet.tagline }} |
| 17 | + |
| 18 | + #title |
| 19 | + {{ $doc.snippet.title }} |
| 20 | + |
| 21 | + #description |
| 22 | + {{ $doc.snippet.description }} |
| 23 | + |
| 24 | + ::::button{:to="$doc.snippet.link" appearance="primary"} |
| 25 | + Button Text |
| 26 | + :::: |
| 27 | + |
| 28 | + ::::button{:to="$doc.snippet.link" appearance="primary"} |
| 29 | + Button Text |
| 30 | + :::: |
| 31 | + |
| 32 | + ::::button |
| 33 | + --- |
| 34 | + :data-testid: $doc.snippet.description |
| 35 | + external: true |
| 36 | + :to: $doc.snippet.link |
| 37 | + appearance: primary |
| 38 | + --- |
| 39 | + Button Text |
| 40 | + :::: |
| 41 | + ::: |
| 42 | +:: |
| 43 | +``` |
| 44 | +
|
| 45 | +## AST |
| 46 | +
|
| 47 | +```json |
| 48 | +{ |
| 49 | + "type": "minimark", |
| 50 | + "value": [ |
| 51 | + [ |
| 52 | + "page-section", |
| 53 | + {}, |
| 54 | + [ |
| 55 | + "page-section", |
| 56 | + {}, |
| 57 | + [ |
| 58 | + "template", |
| 59 | + { |
| 60 | + "name": "tagline" |
| 61 | + }, |
| 62 | + "{{ $doc.snippet.tagline }}" |
| 63 | + ], |
| 64 | + [ |
| 65 | + "template", |
| 66 | + { |
| 67 | + "name": "title" |
| 68 | + }, |
| 69 | + "{{ $doc.snippet.title }}" |
| 70 | + ], |
| 71 | + [ |
| 72 | + "template", |
| 73 | + { |
| 74 | + "name": "description" |
| 75 | + }, |
| 76 | + [ |
| 77 | + "p", |
| 78 | + {}, |
| 79 | + "{{ $doc.snippet.description }}" |
| 80 | + ], |
| 81 | + [ |
| 82 | + "button", |
| 83 | + { |
| 84 | + ":to": "$doc.snippet.link", |
| 85 | + "appearance": "primary" |
| 86 | + }, |
| 87 | + "Button Text" |
| 88 | + ], |
| 89 | + [ |
| 90 | + "button", |
| 91 | + { |
| 92 | + ":to": "$doc.snippet.link", |
| 93 | + "appearance": "primary" |
| 94 | + }, |
| 95 | + "Button Text" |
| 96 | + ], |
| 97 | + [ |
| 98 | + "button", |
| 99 | + { |
| 100 | + ":data-testid": "$doc.snippet.description", |
| 101 | + "external": "true", |
| 102 | + ":to": "$doc.snippet.link", |
| 103 | + "appearance": "primary" |
| 104 | + }, |
| 105 | + "Button Text" |
| 106 | + ] |
| 107 | + ] |
| 108 | + ] |
| 109 | + ] |
| 110 | + ] |
| 111 | +} |
| 112 | +``` |
| 113 | + |
| 114 | +## HTML |
| 115 | + |
| 116 | +```html |
| 117 | +<page-section> |
| 118 | + <page-section> |
| 119 | + <template name="tagline"> |
| 120 | + {{ $doc.snippet.tagline }} |
| 121 | + </template> |
| 122 | + <template name="title"> |
| 123 | + {{ $doc.snippet.title }} |
| 124 | + </template> |
| 125 | + <template name="description"> |
| 126 | + <p>{{ $doc.snippet.description }}</p> |
| 127 | + <button to="$doc.snippet.link" appearance="primary"> |
| 128 | + Button Text |
| 129 | + </button> |
| 130 | + <button to="$doc.snippet.link" appearance="primary"> |
| 131 | + Button Text |
| 132 | + </button> |
| 133 | + <button data-testid="$doc.snippet.description" external="true" to="$doc.snippet.link" appearance="primary"> |
| 134 | + Button Text |
| 135 | + </button> |
| 136 | + </template> |
| 137 | + </page-section> |
| 138 | +</page-section> |
| 139 | +``` |
| 140 | + |
| 141 | +## Markdown |
| 142 | + |
| 143 | +```md |
| 144 | +::page-section |
| 145 | + :::page-section |
| 146 | + #tagline |
| 147 | + {{ $doc.snippet.tagline }} |
| 148 | + |
| 149 | + #title |
| 150 | + {{ $doc.snippet.title }} |
| 151 | + |
| 152 | + #description |
| 153 | + {{ $doc.snippet.description }} |
| 154 | + |
| 155 | + ::::button{:to="$doc.snippet.link" appearance="primary"} |
| 156 | + Button Text |
| 157 | + :::: |
| 158 | + |
| 159 | + ::::button{:to="$doc.snippet.link" appearance="primary"} |
| 160 | + Button Text |
| 161 | + :::: |
| 162 | + |
| 163 | + ::::button |
| 164 | + --- |
| 165 | + :data-testid: $doc.snippet.description |
| 166 | + external: true |
| 167 | + :to: $doc.snippet.link |
| 168 | + appearance: primary |
| 169 | + --- |
| 170 | + Button Text |
| 171 | + :::: |
| 172 | + ::: |
| 173 | +:: |
| 174 | +``` |
0 commit comments