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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ import alert from 'comark/plugins/alert'
import frontmatter from 'comark/plugins/frontmatter' // default via registerDefaultPlugins
import components from 'comark/plugins/components' // default via registerDefaultPlugins
import attributes from 'comark/plugins/attributes' // default via registerDefaultPlugins
import html from 'comark/plugins/html' // default via registerDefaultPlugins
import html from 'comark/plugins/html' // default via registerDefaultPlugins; html({ markdown: false }) = blank-line-only markdown nesting (CommonMark-style)

// markdown-it / markdown-exit adapters (e.g. VitePress)
import { markdownItComponents } from 'comark/plugins/components'
Expand Down
2 changes: 1 addition & 1 deletion packages/comark/SPEC/COMARK/attribute-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Here ![alt](https://example.com/image.jpg){bool} ![alt](https://example.com/imag
## HTML

```html
<p>Here <img src="https://example.com/image.jpg" alt="alt" bool /> <img src="https://example.com/image.jpg" alt="alt" id="id1" /> <img src="https://example.com/image.jpg" alt="alt" class="class1" /> <img src="https://example.com/image.jpg" alt="alt" attr="value" /></p>
<p>Here <img src="https://example.com/image.jpg" alt="alt" bool> <img src="https://example.com/image.jpg" alt="alt" id="id1"> <img src="https://example.com/image.jpg" alt="alt" class="class1"> <img src="https://example.com/image.jpg" alt="alt" attr="value"></p>
```

## Markdown
Expand Down
14 changes: 12 additions & 2 deletions packages/comark/SPEC/COMARK/attributes/paragraph+span.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,23 @@ A paragraph [span]{attr="value"}
"attr": "value"
},
"A paragraph ",
["span", {}, "span"]
[
"span",
{},
"span"
]
],
[
"p",
{},
"A paragraph ",
["span", { "attr": "value" }, "span"]
[
"span",
{
"attr": "value"
},
"span"
]
]
]
}
Expand Down
4 changes: 2 additions & 2 deletions packages/comark/SPEC/COMARK/attributes/task-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
```html
<ul class="contains-task-list">
<li class="task-list-item" attr="value">
<input class="task-list-item-checkbox" type="checkbox" disabled /> Task list item
<input class="task-list-item-checkbox" type="checkbox" disabled> Task list item
</li>
<li class="task-list-item" attr2="value2">
<input class="task-list-item-checkbox" type="checkbox" disabled checked /> Task list item
<input class="task-list-item-checkbox" type="checkbox" disabled checked> Task list item
</li>
</ul>
```
Expand Down
98 changes: 49 additions & 49 deletions packages/comark/SPEC/COMARK/attributes/wrapped-pre-highlighted.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,55 +37,55 @@ const variable = "value"
{
"class": "language-ts"
},
[
"span",
{
"class": "line",
"style": "display: inline"
},
[
"span",
{
"style": "color:#D32F2F;--shiki-dark:#81A1C1"
},
"const"
],
[
"span",
{
"style": "color:#1976D2;--shiki-dark:#D8DEE9"
},
" variable"
],
[
"span",
{
"style": "color:#D32F2F;--shiki-dark:#81A1C1"
},
" ="
],
[
"span",
{
"style": "color:#22863A;--shiki-dark:#ECEFF4"
},
" \""
],
[
"span",
{
"style": "color:#22863A;--shiki-dark:#A3BE8C"
},
"value"
],
[
"span",
{
"style": "color:#22863A;--shiki-dark:#ECEFF4"
},
"\""
]
]
[
"span",
{
"class": "line",
"style": "display: inline"
},
[
"span",
{
"style": "color:#D32F2F;--shiki-dark:#81A1C1"
},
"const"
],
[
"span",
{
"style": "color:#1976D2;--shiki-dark:#D8DEE9"
},
" variable"
],
[
"span",
{
"style": "color:#D32F2F;--shiki-dark:#81A1C1"
},
" ="
],
[
"span",
{
"style": "color:#22863A;--shiki-dark:#ECEFF4"
},
" \""
],
[
"span",
{
"style": "color:#22863A;--shiki-dark:#A3BE8C"
},
"value"
],
[
"span",
{
"style": "color:#22863A;--shiki-dark:#ECEFF4"
},
"\""
]
]
]
]
]
Expand Down
2 changes: 1 addition & 1 deletion packages/comark/SPEC/COMARK/component-with-heading.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Text content
```html
<steps>
<h3 id="step-1">Step 1</h3>
<p><img src="https://example.com/image.jpg" alt="Image" /></p>
<p><img src="https://example.com/image.jpg" alt="Image"></p>
<h3 id="step-2">Step 2</h3>
<p>Text content</p>
</steps>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,32 @@ Line three
{},
[
"template",
{ "name": "description" },
["p", {}, "Line one"],
["hr", {}],
["p", {}, "Middle line"],
["hr", {}],
["p", {}, "Line three"]
{
"name": "description"
},
[
"p",
{},
"Line one"
],
[
"hr",
{}
],
[
"p",
{},
"Middle line"
],
[
"hr",
{}
],
[
"p",
{},
"Line three"
]
]
]
]
Expand All @@ -45,9 +65,9 @@ Line three
<card>
<template name="description">
<p>Line one</p>
<hr />
<hr>
<p>Middle line</p>
<hr />
<hr>
<p>Line three</p>
</template>
</card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,29 @@ Below
[
"card",
{},
["p", {}, "Above"],
["hr", {}],
["p", {}, "Middle text"],
["hr", {}],
["p", {}, "Below"]
[
"p",
{},
"Above"
],
[
"hr",
{}
],
[
"p",
{},
"Middle text"
],
[
"hr",
{}
],
[
"p",
{},
"Below"
]
]
]
}
Expand All @@ -39,9 +57,9 @@ Below
```html
<card>
<p>Above</p>
<hr />
<hr>
<p>Middle text</p>
<hr />
<hr>
<p>Below</p>
</card>
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ options:
"nodes": [
[
"alert",
{ "type": "success" },
{
"type": "success"
},
"✅ Successfully deployed! 🚀"
],
[
"alert",
{ "type": "warning" },
{
"type": "warning"
},
"⚠️ Please backup your data before proceeding"
]
]
Expand Down
8 changes: 6 additions & 2 deletions packages/comark/SPEC/COMARK/emoji-inside-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ options:
"nodes": [
[
"alert",
{ "type": "success" },
{
"type": "success"
},
"✅ Successfully deployed! 🚀"
],
[
"alert",
{ "type": "warning" },
{
"type": "warning"
},
"⚠️ Please backup your data before proceeding"
]
]
Expand Down
4 changes: 2 additions & 2 deletions packages/comark/SPEC/COMARK/frontmatter-empty.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
## HTML

```html
<hr />
<hr />
<hr>
<hr>
<h1 id="content">Content</h1>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
## HTML

```html
<hr />
<hr>
<h1 id="heading">Heading</h1>
```

Expand Down
2 changes: 1 addition & 1 deletion packages/comark/SPEC/COMARK/image-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Here ![alt](https://example.com/image.jpg){bool} ![alt](https://example.com/imag
## HTML

```html
<p>Here <img src="https://example.com/image.jpg" alt="alt" bool /> <img src="https://example.com/image.jpg" alt="alt" id="id1" /> <img src="https://example.com/image.jpg" alt="alt" class="class1" /> <img src="https://example.com/image.jpg" alt="alt" attr="value" /></p>
<p>Here <img src="https://example.com/image.jpg" alt="alt" bool> <img src="https://example.com/image.jpg" alt="alt" id="id1"> <img src="https://example.com/image.jpg" alt="alt" class="class1"> <img src="https://example.com/image.jpg" alt="alt" attr="value"></p>
```

## Markdown
Expand Down
2 changes: 1 addition & 1 deletion packages/comark/SPEC/COMARK/image-no-alt.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
## HTML

```html
<p><img src="/my/cool/path" /></p>
<p><img src="/my/cool/path"></p>
```

## Markdown
Expand Down
6 changes: 3 additions & 3 deletions packages/comark/SPEC/COMARK/image-title.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"alt": "alt",
"title": "A title",
"class": "rounded-asymmetric",
"width":"200"
"width": "200"
}
]
]
Expand All @@ -47,8 +47,8 @@
## HTML

```html
<p><img src="https://example.com/image.jpg" title="title" alt="alt" attr="value" /></p>
<p><img src="img.png" title="A title" alt="alt" class="rounded-asymmetric" width="200" /></p>
<p><img src="https://example.com/image.jpg" title="title" alt="alt" attr="value"></p>
<p><img src="img.png" title="A title" alt="alt" class="rounded-asymmetric" width="200"></p>
```

## Markdown
Expand Down
Loading
Loading