Skip to content
Open
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
48 changes: 48 additions & 0 deletions packages/comark/SPEC/COMARK/codeblock-trailing-blank-lines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Input

```md
```txt
line

```
```

## AST

```json
{
"frontmatter": {},
"meta": {},
"nodes": [
[
"pre",
{
"language": "txt"
},
[
"code",
{
"class": "language-txt"
},
"line\n"
]
]
]
}
```

## HTML

```html
<pre data-language="txt"><code class="language-txt">line
</code></pre>
```

## Markdown

```md
```txt
line

```
```
48 changes: 48 additions & 0 deletions packages/comark/SPEC/COMARK/codeblock-trailing-whitespace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Input

```md
```txt
line

```
```

## AST

```json
{
"frontmatter": {},
"meta": {},
"nodes": [
[
"pre",
{
"language": "txt"
},
[
"code",
{
"class": "language-txt"
},
"line \n "
]
]
]
}
```

## HTML

```html
<pre data-language="txt"><code class="language-txt">line
</code></pre>
```

## Markdown

```md
```txt
line

```
```
59 changes: 59 additions & 0 deletions packages/comark/SPEC/COMARK/component-name-comment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Input

```md
Some :comment[a note]{author="maxi"} text.

::comment
body
::
```

## AST

```json
{
"frontmatter": {},
"meta": {},
"nodes": [
[
"p",
{},
"Some ",
[
"comment",
{
"author": "maxi"
},
"a note"
],
" text."
],
[
"comment",
{},
"body"
]
]
}
```

## HTML

```html
<p>
Some <comment author="maxi">a note</comment> text.
</p>
<comment>
body
</comment>
```

## Markdown

```md
Some :comment[a note]{author="maxi"} text.

::comment
body
::
```
59 changes: 59 additions & 0 deletions packages/comark/SPEC/COMARK/component-name-math.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Input

```md
Some :math[x] text.

::math{k="v"}
body
::
```

## AST

```json
{
"frontmatter": {},
"meta": {},
"nodes": [
[
"p",
{},
"Some ",
[
"math",
{},
"x"
],
" text."
],
[
"math",
{
"k": "v"
},
"body"
]
]
}
```

## HTML

```html
<p>
Some <math>x</math> text.
</p>
<math k="v">
body
</math>
```

## Markdown

```md
Some :math[x] text.

::math{k="v"}
body
::
```
57 changes: 57 additions & 0 deletions packages/comark/SPEC/COMARK/component-name-mermaid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Input

```md
Some :mermaid[x] text.

::mermaid
body
::
```

## AST

```json
{
"frontmatter": {},
"meta": {},
"nodes": [
[
"p",
{},
"Some ",
[
"mermaid",
{},
"x"
],
" text."
],
[
"mermaid",
{},
"body"
]
]
}
```

## HTML

```html
<p>
Some <mermaid>x</mermaid> text.
</p>
<mermaid>
body
</mermaid>
```

## Markdown

```md
Some :mermaid[x] text.

::mermaid
body
::
```
56 changes: 56 additions & 0 deletions packages/comark/SPEC/COMARK/component-name-table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Input

```md
::table{src="data.csv"}
::

Some :table[x] text.
```

## AST

```json
{
"frontmatter": {},
"meta": {},
"nodes": [
[
"table",
{
"src": "data.csv"
}
],
[
"p",
{},
"Some ",
[
"table",
{},
"x"
],
" text."
]
]
}
```

## HTML

```html
<table src="data.csv"></table>
<p>
Some
<table>x</table>
text.
</p>
```

## Markdown

```md
::table{src="data.csv"}
::

Some :table[x] text.
```
59 changes: 59 additions & 0 deletions packages/comark/SPEC/COMARK/component-name-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Input

```md
Some :template[x] text.

::template{k="v"}
body
::
```

## AST

```json
{
"frontmatter": {},
"meta": {},
"nodes": [
[
"p",
{},
"Some ",
[
"template",
{},
"x"
],
" text."
],
[
"template",
{
"k": "v"
},
"body"
]
]
}
```

## HTML

```html
<p>
Some <template>x</template> text.
</p>
<template k="v">
body
</template>
```

## Markdown

```md
Some :template[x] text.

::template{k="v"}
body
::
```
1 change: 1 addition & 0 deletions packages/comark/SPEC/COMARK/shiki-codeblock-twoslash.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,6 @@ const message = "Hello from twoslash"
```md
```ts twoslash
const const message: "Hello from twoslash"message = "Hello from twoslash"

```
```
Loading
Loading