docs: Marko 6 links (#2817)

* docs: Marko 6 README

* fix: use markojs.com

* chore: add changeset
This commit is contained in:
Luke LaValva 2025-09-09 15:55:38 -07:00 committed by GitHub
parent 41c58d24bb
commit e70f0c69e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
98 changed files with 219 additions and 152 deletions

View File

@ -0,0 +1,6 @@
---
"@marko/runtime-tags": patch
"@marko/translator-interop-class-tags": patch
---
Update error messages to markojs.com

View File

@ -1 +1 @@
packages/runtime-class/README.md
packages/runtime-tags/README.md

View File

@ -0,0 +1,72 @@
<div align="center">
# [<img alt="Marko" src="https://raw.githubusercontent.com/marko-js/website-next/refs/heads/main/public/logo.svg" width="250">](https://markojs.com/)
**A declarative, HTML-based language that makes building web apps fun 🔥**
[![NPM](https://img.shields.io/npm/v/marko.svg)](https://www.npmjs.com/package/marko)
[![Discord Chat](https://img.shields.io/badge/discord-chat-7188da.svg)](https://discord.gg/RFGxYGs)
[![Continuous Integration status](https://github.com/marko-js/marko/actions/workflows/ci.yml/badge.svg)](https://github.com/marko-js/marko/actions/workflows/ci.yml)
[![Code coverage %](https://codecov.io/gh/marko-js/marko/branch/master/graph/badge.svg)](https://codecov.io/gh/marko-js/marko)
[![# of monthly downloads](https://img.shields.io/npm/dm/marko.svg)](https://npm-stat.com/charts.html?package=marko)
[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7029/badge)](https://bestpractices.coreinfrastructure.org/projects/7029)
[Docs](https://markojs.com/docs/introduction/getting-started) ∙ [Try Online](https://markojs.com/playground) ∙ [Contribute](#contributors) ∙ [Get Support](#community--support)
</div>
## Intro
Marko is HTML _reimagined_ as a language for building dynamic and reactive user interfaces. Almost any valid HTML is valid Marko, and Marko extends HTML for building modern applications more declaratively. Among these extensions are [components](https://markojs.com/docs/reference/custom-tag), [conditionals](https://markojs.com/docs/reference/core-tag#if--else) and [loops](https://markojs.com/docs/reference/core-tag#for), and a full [reactivity system](https://markojs.com/docs/reference/reactivity).
### Example Component
The following renders a button and a counter of how many times the button has been pressed:
**click-count.marko**
```marko
// HTML + JavaScript = 💜
<let/count=0>
<button onClick() { count++ }>
Clicked ${count} times
</button>
```
## Getting Started
1. `npm init marko`
2. Read the [docs](https://markojs.com/docs/introduction/getting-started)
## Community & Support
<table>
<thead><tr>
<th><svg viewBox="0 0 576 512"><path d="M492.5 69.8c-.2-.3-.4-.6-.8-.7-38.1-17.5-78.4-30-119.7-37.1-.4-.1-.8 0-1.1 .1s-.6 .4-.8 .8c-5.5 9.9-10.5 20.2-14.9 30.6-44.6-6.8-89.9-6.8-134.4 0-4.5-10.5-9.5-20.7-15.1-30.6-.2-.3-.5-.6-.8-.8s-.7-.2-1.1-.2c-41.3 7.1-81.6 19.6-119.7 37.1-.3 .1-.6 .4-.8 .7-76.2 113.8-97.1 224.9-86.9 334.5 0 .3 .1 .5 .2 .8s.3 .4 .5 .6c44.4 32.9 94 58 146.8 74.2 .4 .1 .8 .1 1.1 0s.7-.4 .9-.7c11.3-15.4 21.4-31.8 30-48.8 .1-.2 .2-.5 .2-.8s0-.5-.1-.8-.2-.5-.4-.6-.4-.3-.7-.4c-15.8-6.1-31.2-13.4-45.9-21.9-.3-.2-.5-.4-.7-.6s-.3-.6-.3-.9 0-.6 .2-.9 .3-.5 .6-.7c3.1-2.3 6.2-4.7 9.1-7.1 .3-.2 .6-.4 .9-.4s.7 0 1 .1c96.2 43.9 200.4 43.9 295.5 0 .3-.1 .7-.2 1-.2s.7 .2 .9 .4c2.9 2.4 6 4.9 9.1 7.2 .2 .2 .4 .4 .6 .7s.2 .6 .2 .9-.1 .6-.3 .9-.4 .5-.6 .6c-14.7 8.6-30 15.9-45.9 21.8-.2 .1-.5 .2-.7 .4s-.3 .4-.4 .7-.1 .5-.1 .8 .1 .5 .2 .8c8.8 17 18.8 33.3 30 48.8 .2 .3 .6 .6 .9 .7s.8 .1 1.1 0c52.9-16.2 102.6-41.3 147.1-74.2 .2-.2 .4-.4 .5-.6s.2-.5 .2-.8c12.3-126.8-20.5-236.9-86.9-334.5zm-302 267.7c-29 0-52.8-26.6-52.8-59.2s23.4-59.2 52.8-59.2c29.7 0 53.3 26.8 52.8 59.2 0 32.7-23.4 59.2-52.8 59.2zm195.4 0c-29 0-52.8-26.6-52.8-59.2s23.4-59.2 52.8-59.2c29.7 0 53.3 26.8 52.8 59.2 0 32.7-23.2 59.2-52.8 59.2z"></path></svg>
<th><svg viewBox="0 0 576 512"><path d="M407.8 294.7c-3.3-.4-6.7-.8-10-1.3 3.4 .4 6.7 .9 10 1.3zM288 227.1C261.9 176.4 190.9 81.9 124.9 35.3 61.6-9.4 37.5-1.7 21.6 5.5 3.3 13.8 0 41.9 0 58.4S9.1 194 15 213.9c19.5 65.7 89.1 87.9 153.2 80.7 3.3-.5 6.6-.9 10-1.4-3.3 .5-6.6 1-10 1.4-93.9 14-177.3 48.2-67.9 169.9 120.3 124.6 164.8-26.7 187.7-103.4 22.9 76.7 49.2 222.5 185.6 103.4 102.4-103.4 28.1-156-65.8-169.9-3.3-.4-6.7-.8-10-1.3 3.4 .4 6.7 .9 10 1.3 64.1 7.1 133.6-15.1 153.2-80.7 5.9-19.9 15-138.9 15-155.5s-3.3-44.7-21.6-52.9c-15.8-7.1-40-14.9-103.2 29.8-66.1 46.6-137.1 141.1-163.2 191.8z"></path></svg>
<th><svg viewBox="0 0 448 512"><path d="M357.2 48L427.8 48 273.6 224.2 455 464 313 464 201.7 318.6 74.5 464 3.8 464 168.7 275.5-5.2 48 140.4 48 240.9 180.9 357.2 48zM332.4 421.8l39.1 0-252.4-333.8-42 0 255.3 333.8z"></path></svg>
<th><svg viewBox="0 0 512 512"><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM252.8 8c-138.7 0-244.8 105.3-244.8 244 0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1 100-33.2 167.8-128.1 167.8-239 0-138.7-112.5-244-251.2-244zM105.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg>
<tbody><tr><td>
Hang out in our [Discord server](https://discord.gg/marko) to ask questions & discuss marko<td>
Keep up with the community on Bluesky at [@markojs.com](https://bsky.app/profile/markojs.com)<td>
Tweet to [@MarkoDevTeam](https://twitter.com/MarkoDevTeam) or use the [#markojs](https://twitter.com/search?q=%23markojs%20OR%20%40markodevteam&f=live) hashtag<td>
Browse the code, open issues, & make pull requests on [GitHub](https://github.com/marko-js/marko)
</table>
### Contributors
Marko would not be what it is without all those who have contributed ✨
[![All marko-js/marko GitHub contributors](https://opencollective.com/marko-js/contributors.svg?width=890&button=false)](https://github.com/marko-js/marko/graphs/contributors)
### Get Involved!
- Pull requests are welcome!
- Submit [GitHub issues](https://github.com/marko-js/marko/issues) for any feature enhancements, bugs, or documentation problems
- [Read the Contribution Tips and Guidelines](.github/CONTRIBUTING.md)
- Participants in this project agree to abide by [its Code of Conduct](https://github.com/eBay/.github/blob/main/CODE_OF_CONDUCT.md)

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-const-extra-attr/template.marko:1:2
> 1 | <const/x=1 y=2/>
| ^^^^^ The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^ The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-const-extra-attr/template.marko:1:2
> 1 | <const/x=1 y=2/>
| ^^^^^ The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^ The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-const-no-default-value/template.marko:1:2
> 1 | <const/x/>
| ^^^^^ The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^ The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-const-no-default-value/template.marko:1:2
> 1 | <const/x/>
| ^^^^^ The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^ The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-const-no-tag-var/template.marko:1:2
> 1 | <const="Hello"/>
| ^^^^^ The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).
| ^^^^^ The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-const-no-tag-var/template.marko:1:2
> 1 | <const="Hello"/>
| ^^^^^ The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).
| ^^^^^ The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).
2 |

View File

@ -3,4 +3,4 @@
1 | static const myTag = "div"
2 |
> 3 | <myTag/>
| ^^^^^ Local variables must be in a [dynamic tag](https://next.markojs.com/docs/reference/language#dynamic-tags) unless they are PascalCase. Use `<${myTag}/>` or rename to `MyTag`.
| ^^^^^ Local variables must be in a [dynamic tag](https://markojs.com/docs/reference/language#dynamic-tags) unless they are PascalCase. Use `<${myTag}/>` or rename to `MyTag`.

View File

@ -3,4 +3,4 @@
1 | static const myTag = "div"
2 |
> 3 | <myTag/>
| ^^^^^ Local variables must be in a [dynamic tag](https://next.markojs.com/docs/reference/language#dynamic-tags) unless they are PascalCase. Use `<${myTag}/>` or rename to `MyTag`.
| ^^^^^ Local variables must be in a [dynamic tag](https://markojs.com/docs/reference/language#dynamic-tags) unless they are PascalCase. Use `<${myTag}/>` or rename to `MyTag`.

View File

@ -1,4 +1,4 @@
at packages/runtime-tags/src/__tests__/fixtures/error-custom-tag-not-found/template.marko:1:2
> 1 | <buton/>
| ^^^^^ Unable to find entry point for [custom tag](https://next.markojs.com/docs/reference/custom-tag#relative-custom-tags) `<buton>`.
| ^^^^^ Unable to find entry point for [custom tag](https://markojs.com/docs/reference/custom-tag#relative-custom-tags) `<buton>`.

View File

@ -1,4 +1,4 @@
at packages/runtime-tags/src/__tests__/fixtures/error-custom-tag-not-found/template.marko:1:2
> 1 | <buton/>
| ^^^^^ Unable to find entry point for [custom tag](https://next.markojs.com/docs/reference/custom-tag#relative-custom-tags) `<buton>`.
| ^^^^^ Unable to find entry point for [custom tag](https://markojs.com/docs/reference/custom-tag#relative-custom-tags) `<buton>`.

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-debug-extra-attr/template.marko:2:2
1 | <const/x=0/>
> 2 | <debug=x y=1/>
| ^^^^^ The [`<debug>` tag](https://next.markojs.com/docs/reference/core-tag#debug) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^ The [`<debug>` tag](https://markojs.com/docs/reference/core-tag#debug) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-debug-extra-attr/template.marko:2:2
1 | <const/x=0/>
> 2 | <debug=x y=1/>
| ^^^^^ The [`<debug>` tag](https://next.markojs.com/docs/reference/core-tag#debug) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^ The [`<debug>` tag](https://markojs.com/docs/reference/core-tag#debug) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
3 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-define-no-tag-var/template.marko:1:2
> 1 | <define>Hello!</define>
| ^^^^^^ The [`<define>` tag](https://next.markojs.com/docs/reference/core-tag#define) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).
| ^^^^^^ The [`<define>` tag](https://markojs.com/docs/reference/core-tag#define) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-define-no-tag-var/template.marko:1:2
> 1 | <define>Hello!</define>
| ^^^^^^ The [`<define>` tag](https://next.markojs.com/docs/reference/core-tag#define) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).
| ^^^^^^ The [`<define>` tag](https://markojs.com/docs/reference/core-tag#define) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-effect-body-content/template.marko:1:2
> 1 | <effect=(() => {})>Hello</effect>
| ^^^^^^ The [`<effect>`](https://next.markojs.com/docs/reference/core-tag#effect) tag does not support body content.
| ^^^^^^ The [`<effect>`](https://markojs.com/docs/reference/core-tag#effect) tag does not support body content.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-effect-body-content/template.marko:1:2
> 1 | <effect=(() => {})>Hello</effect>
| ^^^^^^ The [`<effect>`](https://next.markojs.com/docs/reference/core-tag#effect) tag does not support body content.
| ^^^^^^ The [`<effect>`](https://markojs.com/docs/reference/core-tag#effect) tag does not support body content.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-effect-extra-attr/template.marko:1:20
> 1 | <script=(() => {}) y=1/>
| ^^^ The [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^^^ The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-effect-extra-attr/template.marko:1:20
> 1 | <script=(() => {}) y=1/>
| ^^^ The [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^^^ The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-effect-tag-var/template.marko:1:9
> 1 | <script/x=(() => {})/>
| ^ The [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) does not support a tag variable reference. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^ The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support a tag variable reference. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-effect-tag-var/template.marko:1:9
> 1 | <script/x=(() => {})/>
| ^ The [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) does not support a tag variable reference. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^ The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support a tag variable reference. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
2 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-else-extra-attr/template.marko:2:21
1 | <if=false>Skipped</if>
> 2 | <else if=input.show y=2>Hello World</else>
| ^^^ The [`else` tag](https://next.markojs.com/docs/reference/core-tag#if--else) only supports an `if=` attribute.
| ^^^ The [`else` tag](https://markojs.com/docs/reference/core-tag#if--else) only supports an `if=` attribute.
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-else-extra-attr/template.marko:2:21
1 | <if=false>Skipped</if>
> 2 | <else if=input.show y=2>Hello World</else>
| ^^^ The [`else` tag](https://next.markojs.com/docs/reference/core-tag#if--else) only supports an `if=` attribute.
| ^^^ The [`else` tag](https://markojs.com/docs/reference/core-tag#if--else) only supports an `if=` attribute.
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-else-no-content/template.marko:2:2
1 | <if=false>Skipped</if>
> 2 | <else />
| ^^^^ The [`else` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires [body content](https://next.markojs.com/docs/reference/language#tag-content).
| ^^^^ The [`else` tag](https://markojs.com/docs/reference/core-tag#if--else) requires [body content](https://markojs.com/docs/reference/language#tag-content).
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-else-no-content/template.marko:2:2
1 | <if=false>Skipped</if>
> 2 | <else />
| ^^^^ The [`else` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires [body content](https://next.markojs.com/docs/reference/language#tag-content).
| ^^^^ The [`else` tag](https://markojs.com/docs/reference/core-tag#if--else) requires [body content](https://markojs.com/docs/reference/language#tag-content).
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-elseif-extra-attr/template.marko:2:21
1 | <if=false>Skipped</if>
> 2 | <else-if=input.show y=2>Hello World</else-if>
| ^^^ The [`else-if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^ The [`else-if` tag](https://markojs.com/docs/reference/core-tag#if--else) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-elseif-extra-attr/template.marko:2:21
1 | <if=false>Skipped</if>
> 2 | <else-if=input.show y=2>Hello World</else-if>
| ^^^ The [`else-if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^ The [`else-if` tag](https://markojs.com/docs/reference/core-tag#if--else) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-elseif-no-content/template.marko:2:2
1 | <if=false>Skipped</if>
> 2 | <else-if=input.show />
| ^^^^^^^ The [`else-if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires [body content](https://next.markojs.com/docs/reference/language#tag-content).
| ^^^^^^^ The [`else-if` tag](https://markojs.com/docs/reference/core-tag#if--else) requires [body content](https://markojs.com/docs/reference/language#tag-content).
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-elseif-no-content/template.marko:2:2
1 | <if=false>Skipped</if>
> 2 | <else-if=input.show />
| ^^^^^^^ The [`else-if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires [body content](https://next.markojs.com/docs/reference/language#tag-content).
| ^^^^^^^ The [`else-if` tag](https://markojs.com/docs/reference/core-tag#if--else) requires [body content](https://markojs.com/docs/reference/language#tag-content).
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-elseif-no-default-value/template.marko:2:2
1 | <if=false>Skipped</if>
> 2 | <else-if>Hello World</else-if>
| ^^^^^^^ The [`else-if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^^^ The [`else-if` tag](https://markojs.com/docs/reference/core-tag#if--else) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-elseif-no-default-value/template.marko:2:2
1 | <if=false>Skipped</if>
> 2 | <else-if>Hello World</else-if>
| ^^^^^^^ The [`else-if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^^^ The [`else-if` tag](https://markojs.com/docs/reference/core-tag#if--else) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
3 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-id-attr/template.marko:1:2
> 1 | <id/firstNameId x=1/>
| ^^ The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^ The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-id-attr/template.marko:1:2
> 1 | <id/firstNameId x=1/>
| ^^ The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^ The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-id-destructure/template.marko:1:5
> 1 | <id/{ firstNameId }/>
| ^^^^^^^^^^^^^^^ The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) cannot be destructured.
| ^^^^^^^^^^^^^^^ The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) cannot be destructured.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-id-destructure/template.marko:1:5
> 1 | <id/{ firstNameId }/>
| ^^^^^^^^^^^^^^^ The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) cannot be destructured.
| ^^^^^^^^^^^^^^^ The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) cannot be destructured.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-id-no-tag-var/template.marko:1:2
> 1 | <id/>
| ^^ The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).
| ^^ The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-id-no-tag-var/template.marko:1:2
> 1 | <id/>
| ^^ The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).
| ^^ The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-if-extra-attr/template.marko:1:16
> 1 | <if=input.show y=2>Hello World</if>
| ^^^ The [`if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^ The [`if` tag](https://markojs.com/docs/reference/core-tag#if--else) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-if-extra-attr/template.marko:1:16
> 1 | <if=input.show y=2>Hello World</if>
| ^^^ The [`if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^ The [`if` tag](https://markojs.com/docs/reference/core-tag#if--else) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-if-no-content/template.marko:1:2
> 1 | <if=input.show />
| ^^ The [`if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires [body content](https://next.markojs.com/docs/reference/language#tag-content).
| ^^ The [`if` tag](https://markojs.com/docs/reference/core-tag#if--else) requires [body content](https://markojs.com/docs/reference/language#tag-content).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-if-no-content/template.marko:1:2
> 1 | <if=input.show />
| ^^ The [`if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires [body content](https://next.markojs.com/docs/reference/language#tag-content).
| ^^ The [`if` tag](https://markojs.com/docs/reference/core-tag#if--else) requires [body content](https://markojs.com/docs/reference/language#tag-content).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-if-no-default-value/template.marko:1:2
> 1 | <if>Hello World</if>
| ^^ The [`if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^ The [`if` tag](https://markojs.com/docs/reference/core-tag#if--else) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-if-no-default-value/template.marko:1:2
> 1 | <if>Hello World</if>
| ^^ The [`if` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^ The [`if` tag](https://markojs.com/docs/reference/core-tag#if--else) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-let-extra-attr/template.marko:1:14
> 1 | <let/count=0 y=3/>
| ^^^ The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value) and its change handler.
| ^^^ The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value) and its change handler.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-let-extra-attr/template.marko:1:14
> 1 | <let/count=0 y=3/>
| ^^^ The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value) and its change handler.
| ^^^ The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value) and its change handler.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-let-no-tag-var/template.marko:1:2
> 1 | <let=0/>
| ^^^ The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).
| ^^^ The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-let-no-tag-var/template.marko:1:2
> 1 | <let=0/>
| ^^^ The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).
| ^^^ The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-let-spread-attr/template.marko:1:12
> 1 | <let/count ...{ value: 1, valueChange() {} }/>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The [`<let>`](https://next.markojs.com/docs/reference/core-tag#let) tag does not support `...spread` attributes.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The [`<let>`](https://markojs.com/docs/reference/core-tag#let) tag does not support `...spread` attributes.
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-let-spread-attr/template.marko:1:12
> 1 | <let/count ...{ value: 1, valueChange() {} }/>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The [`<let>`](https://next.markojs.com/docs/reference/core-tag#let) tag does not support `...spread` attributes.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The [`<let>`](https://markojs.com/docs/reference/core-tag#let) tag does not support `...spread` attributes.
2 |

View File

@ -1,4 +1,4 @@
at packages/runtime-tags/src/__tests__/fixtures/error-lifecycle-no-attrs/template.marko:1:2
> 1 | <lifecycle />
| ^^^^^^^^^ The [`<lifecycle>` tag](https://next.markojs.com/docs/reference/core-tag#lifecycle) requires at least one attribute.
| ^^^^^^^^^ The [`<lifecycle>` tag](https://markojs.com/docs/reference/core-tag#lifecycle) requires at least one attribute.

View File

@ -1,4 +1,4 @@
at packages/runtime-tags/src/__tests__/fixtures/error-lifecycle-no-attrs/template.marko:1:2
> 1 | <lifecycle />
| ^^^^^^^^^ The [`<lifecycle>` tag](https://next.markojs.com/docs/reference/core-tag#lifecycle) requires at least one attribute.
| ^^^^^^^^^ The [`<lifecycle>` tag](https://markojs.com/docs/reference/core-tag#lifecycle) requires at least one attribute.

View File

@ -1,7 +1,7 @@
at packages/runtime-tags/src/__tests__/fixtures/error-lifecycle-spread-attr/template.marko:1:2
> 1 | <lifecycle ...{
| ^^^^^^^^^ The [`<lifecycle>` tag](https://next.markojs.com/docs/reference/core-tag#lifecycle) does not support [`...spread` attributes](https://next.markojs.com/docs/reference/language#spread-attributes).
| ^^^^^^^^^ The [`<lifecycle>` tag](https://markojs.com/docs/reference/core-tag#lifecycle) does not support [`...spread` attributes](https://markojs.com/docs/reference/language#spread-attributes).
2 | onMount() {},
3 | onUpdate() {},
4 | onDestroy() {}

View File

@ -1,7 +1,7 @@
at packages/runtime-tags/src/__tests__/fixtures/error-lifecycle-spread-attr/template.marko:1:2
> 1 | <lifecycle ...{
| ^^^^^^^^^ The [`<lifecycle>` tag](https://next.markojs.com/docs/reference/core-tag#lifecycle) does not support [`...spread` attributes](https://next.markojs.com/docs/reference/language#spread-attributes).
| ^^^^^^^^^ The [`<lifecycle>` tag](https://markojs.com/docs/reference/core-tag#lifecycle) does not support [`...spread` attributes](https://markojs.com/docs/reference/language#spread-attributes).
2 | onMount() {},
3 | onUpdate() {},
4 | onDestroy() {}

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-log-extra-attr/template.marko:1:2
> 1 | <log="Hello" y=1/>
| ^^^ The [`<log>` tag](https://next.markojs.com/docs/reference/core-tag#log) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^ The [`<log>` tag](https://markojs.com/docs/reference/core-tag#log) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-log-extra-attr/template.marko:1:2
> 1 | <log="Hello" y=1/>
| ^^^ The [`<log>` tag](https://next.markojs.com/docs/reference/core-tag#log) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^ The [`<log>` tag](https://markojs.com/docs/reference/core-tag#log) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-log-no-default-value/template.marko:1:2
> 1 | <log/>
| ^^^ The [`<log>` tag](https://next.markojs.com/docs/reference/core-tag#log) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^ The [`<log>` tag](https://markojs.com/docs/reference/core-tag#log) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-log-no-default-value/template.marko:1:2
> 1 | <log/>
| ^^^ The [`<log>` tag](https://next.markojs.com/docs/reference/core-tag#log) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^ The [`<log>` tag](https://markojs.com/docs/reference/core-tag#log) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -2,7 +2,7 @@
at packages/runtime-tags/src/__tests__/fixtures/error-return-if-else/template.marko:2:4
1 | <if=input.show>
> 2 | <return=1/>
| ^^^^^^ The [`<return>` tag](https://next.markojs.com/docs/reference/core-tag#return) can not be used under the `<"if">` tag.
| ^^^^^^ The [`<return>` tag](https://markojs.com/docs/reference/core-tag#return) can not be used under the `<"if">` tag.
3 | </if>
4 | <else>
5 | <return=2/>

View File

@ -2,7 +2,7 @@
at packages/runtime-tags/src/__tests__/fixtures/error-return-if-else/template.marko:2:4
1 | <if=input.show>
> 2 | <return=1/>
| ^^^^^^ The [`<return>` tag](https://next.markojs.com/docs/reference/core-tag#return) can not be used under the `<"if">` tag.
| ^^^^^^ The [`<return>` tag](https://markojs.com/docs/reference/core-tag#return) can not be used under the `<"if">` tag.
3 | </if>
4 | <else>
5 | <return=2/>

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-return-multiple/template.marko:2:2
1 | <return=1/>
> 2 | <return=2/>
| ^^^^^^ Cannot have multiple [`<return>` tags](https://next.markojs.com/docs/reference/core-tag#return) for the template.
| ^^^^^^ Cannot have multiple [`<return>` tags](https://markojs.com/docs/reference/core-tag#return) for the template.
3 |

View File

@ -2,5 +2,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-return-multiple/template.marko:2:2
1 | <return=1/>
> 2 | <return=2/>
| ^^^^^^ Cannot have multiple [`<return>` tags](https://next.markojs.com/docs/reference/core-tag#return) for the template.
| ^^^^^^ Cannot have multiple [`<return>` tags](https://markojs.com/docs/reference/core-tag#return) for the template.
3 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-return-no-default-value/template.marko:1:2
> 1 | <return/>
| ^^^^^^ The [`<return>` tag](https://next.markojs.com/docs/reference/core-tag#return) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^^ The [`<return>` tag](https://markojs.com/docs/reference/core-tag#return) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -1,5 +1,5 @@
at packages/runtime-tags/src/__tests__/fixtures/error-return-no-default-value/template.marko:1:2
> 1 | <return/>
| ^^^^^^ The [`<return>` tag](https://next.markojs.com/docs/reference/core-tag#return) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).
| ^^^^^^ The [`<return>` tag](https://markojs.com/docs/reference/core-tag#return) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).
2 |

View File

@ -2,6 +2,6 @@
at packages/runtime-tags/src/__tests__/fixtures/error-script-attrs/error-script-placeholder/template.marko:2:3
1 | <script>
> 2 | ${"Hello <b> </script>"}
| ^^^^^^^^^^^^^^^^^^^^^^^^ Unexpected content in [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^^^^^^^^^^^^^^^^^^^^^^^^ Unexpected content in [`<script>` tag](https://markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
3 | </script>
4 |

View File

@ -1,7 +1,7 @@
at packages/runtime-tags/src/__tests__/fixtures/error-script-attrs/template.marko:1:9
> 1 | <script blocking="render">
| ^^^^^^^^^^^^^^^^^ The [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^^^^^^^^^^^^^^^^^ The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
2 | console.log("hi")
3 | </script>
4 |

View File

@ -2,6 +2,6 @@
at packages/runtime-tags/src/__tests__/fixtures/error-script-attrs/error-script-placeholder/template.marko:2:3
1 | <script>
> 2 | ${"Hello <b> </script>"}
| ^^^^^^^^^^^^^^^^^^^^^^^^ Unexpected content in [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^^^^^^^^^^^^^^^^^^^^^^^^ Unexpected content in [`<script>` tag](https://markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
3 | </script>
4 |

View File

@ -1,7 +1,7 @@
at packages/runtime-tags/src/__tests__/fixtures/error-script-attrs/template.marko:1:9
> 1 | <script blocking="render">
| ^^^^^^^^^^^^^^^^^ The [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^^^^^^^^^^^^^^^^^ The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
2 | console.log("hi")
3 | </script>
4 |

View File

@ -2,6 +2,6 @@
at packages/runtime-tags/src/__tests__/fixtures/error-script-placeholder/template.marko:2:3
1 | <script>
> 2 | ${"Hello <b> </script>"}
| ^^^^^^^^^^^^^^^^^^^^^^^^ Unexpected content in [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^^^^^^^^^^^^^^^^^^^^^^^^ Unexpected content in [`<script>` tag](https://markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
3 | </script>
4 |

View File

@ -2,6 +2,6 @@
at packages/runtime-tags/src/__tests__/fixtures/error-script-placeholder/template.marko:2:3
1 | <script>
> 2 | ${"Hello <b> </script>"}
| ^^^^^^^^^^^^^^^^^^^^^^^^ Unexpected content in [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
| ^^^^^^^^^^^^^^^^^^^^^^^^ Unexpected content in [`<script>` tag](https://markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.
3 | </script>
4 |

View File

@ -1,7 +1,7 @@
at packages/runtime-tags/src/__tests__/fixtures/error-style-attrs/template.marko:1:17
> 1 | <style blocking="render">
| ^^^^^^^^ The `style` does not support html attributes. For a native html [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.
| ^^^^^^^^ The `style` does not support html attributes. For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.
2 | body {
3 | color: green;
4 | }

View File

@ -1,7 +1,7 @@
at packages/runtime-tags/src/__tests__/fixtures/error-style-attrs/template.marko:1:17
> 1 | <style blocking="render">
| ^^^^^^^^ The `style` does not support html attributes. For a native html [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.
| ^^^^^^^^ The `style` does not support html attributes. For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.
2 | body {
3 | color: green;
4 | }

View File

@ -3,7 +3,7 @@
1 | <style>
2 | body {
> 3 | color: ${"green"}
| ^^^^^^^^^^ The [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) currently only supports static content. For a native html [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.
| ^^^^^^^^^^ The [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) currently only supports static content. For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.
4 | }
5 | </style>
6 |

View File

@ -3,7 +3,7 @@
1 | <style>
2 | body {
> 3 | color: ${"green"}
| ^^^^^^^^^^ The [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) currently only supports static content. For a native html [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.
| ^^^^^^^^^^ The [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) currently only supports static content. For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.
4 | }
5 | </style>
6 |

View File

@ -2,7 +2,7 @@
at packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-compile-error/template.marko:2:22
1 | <let/x=1/>
> 2 | <let/y=x valueChange=5 />
| ^ The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) [`valueChange=` attribute](https://next.markojs.com/docs/reference/core-tag#controllable-let) must be a function.
| ^ The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) [`valueChange=` attribute](https://markojs.com/docs/reference/core-tag#controllable-let) must be a function.
3 | <button onClick() { y++; }>
4 | ${x}|${y}
5 | </button>

View File

@ -2,7 +2,7 @@
at packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-compile-error/template.marko:2:22
1 | <let/x=1/>
> 2 | <let/y=x valueChange=5 />
| ^ The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) [`valueChange=` attribute](https://next.markojs.com/docs/reference/core-tag#controllable-let) must be a function.
| ^ The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) [`valueChange=` attribute](https://markojs.com/docs/reference/core-tag#controllable-let) must be a function.
3 | <button onClick() { y++; }>
4 | ${x}|${y}
5 | </button>

View File

@ -64,7 +64,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<await>` tag](https://next.markojs.com/docs/reference/core-tag#await) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<await>` tag](https://markojs.com/docs/reference/core-tag#await) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
@ -76,7 +76,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<await>` tag](https://next.markojs.com/docs/reference/core-tag#await) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<await>` tag](https://markojs.com/docs/reference/core-tag#await) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
@ -84,7 +84,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<await>` tag](https://next.markojs.com/docs/reference/core-tag#await) requires [content](https://next.markojs.com/docs/reference/language#tag-content).",
"The [`<await>` tag](https://markojs.com/docs/reference/core-tag#await) requires [content](https://markojs.com/docs/reference/language#tag-content).",
);
}
@ -95,7 +95,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<await>` tag](https://next.markojs.com/docs/reference/core-tag#await) only supports a single parameter.",
"The [`<await>` tag](https://markojs.com/docs/reference/core-tag#await) only supports a single parameter.",
);
}
@ -205,8 +205,7 @@ export default {
autocomplete: [
{
description: "Use to consume asynchronous an data.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#await",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#await",
},
],
types: runtimeInfo.name + "/tags/await.d.marko",

View File

@ -30,7 +30,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).",
"The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).",
);
}
@ -38,7 +38,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
@ -50,7 +50,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<const>` tag](https://next.markojs.com/docs/reference/core-tag#const) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<const>` tag](https://markojs.com/docs/reference/core-tag#const) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
@ -107,8 +107,7 @@ export default {
autocomplete: [
{
description: "Use to create an constant binding.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#const",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#const",
},
],
types: runtimeInfo.name + "/tags/const.d.marko",

View File

@ -30,7 +30,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<debug>` tag](https://next.markojs.com/docs/reference/core-tag#debug) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<debug>` tag](https://markojs.com/docs/reference/core-tag#debug) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
},
@ -58,8 +58,7 @@ export default {
autocomplete: [
{
description: "Debug on value change.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#debug",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#debug",
},
],
types: runtimeInfo.name + "/tags/debug.d.marko",

View File

@ -30,7 +30,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<define>` tag](https://next.markojs.com/docs/reference/core-tag#define) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).",
"The [`<define>` tag](https://markojs.com/docs/reference/core-tag#define) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).",
);
}
@ -103,8 +103,7 @@ export default {
{
description:
"Use to create a constant object binding that can be rendered.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#define",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#define",
},
],
types: runtimeInfo.name + "/tags/define.d.marko",

View File

@ -80,7 +80,7 @@ export default {
break;
default:
throw tag.buildCodeFrameError(
"The [`<for>` tag](https://next.markojs.com/docs/reference/core-tag#for) requires an `of=`, `in=`, or `to=` attribute.",
"The [`<for>` tag](https://markojs.com/docs/reference/core-tag#for) requires an `of=`, `in=`, or `to=` attribute.",
);
}
@ -332,18 +332,15 @@ export default {
snippet: "for|${1:value, index}| of=${3:array}",
description:
"Use to iterate over lists, object properties, or between ranges.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#for",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#for",
},
{
snippet: "for|${1:name, value}| in=${3:object}",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#for",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#for",
},
{
snippet: "for|${1:index}| to=${2:number}",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#for",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#for",
},
],
} satisfies Tag;

View File

@ -63,7 +63,7 @@ export default {
throw tag
.get("var")
.buildCodeFrameError(
"The [`<html-comment>` tag](https://next.markojs.com/docs/reference/core-tag#html-comment) tag variable cannot be destructured.",
"The [`<html-comment>` tag](https://markojs.com/docs/reference/core-tag#html-comment) tag variable cannot be destructured.",
);
}
needsBinding = true;
@ -244,7 +244,7 @@ export default {
description:
"Use to create an html comment that is not stripped from the output.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#html-comment",
"https://markojs.com/docs/reference/core-tag#html-comment",
},
],
} as Tag;

View File

@ -484,7 +484,7 @@ export default {
description:
"Use instead of `<script>` to render a native tag directly, without processing by Marko.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#html-script--html-style",
"https://markojs.com/docs/reference/core-tag#html-script--html-style",
},
],
} as Tag;

View File

@ -479,7 +479,7 @@ export default {
description:
"Use instead of `<style>` to render a native tag directly, without processing by Marko.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#html-script--html-style",
"https://markojs.com/docs/reference/core-tag#html-script--html-style",
},
],
} as Tag;

View File

@ -34,7 +34,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).",
"The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).",
);
}
@ -42,7 +42,7 @@ export default {
throw tag
.get("var")
.buildCodeFrameError(
"The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) cannot be destructured.",
"The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) cannot be destructured.",
);
}
@ -55,7 +55,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<id>` tag](https://next.markojs.com/docs/reference/core-tag#id) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<id>` tag](https://markojs.com/docs/reference/core-tag#id) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
@ -111,7 +111,7 @@ export default {
displayText: "id/<name>",
description: "Use to create a unique identifier.",
snippet: "id/${1:name}",
descriptionMoreURL: "https://next.markojs.com/docs/reference/core-tag#id",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#id",
},
],
types: runtimeInfo.name + "/tags/id.d.marko",

View File

@ -309,7 +309,7 @@ export const IfTag = {
snippet: "if=${1:condition}",
description: "Use to display content only if the condition is met.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#if--else",
"https://markojs.com/docs/reference/core-tag#if--else",
},
],
} satisfies Tag;
@ -322,7 +322,7 @@ export const ElseIfTag = {
description:
"Use after an <if> or <else-if> tag to display content if those conditions do not match and this one does.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#if--else",
"https://markojs.com/docs/reference/core-tag#if--else",
},
],
};
@ -334,7 +334,7 @@ export const ElseTag = {
description:
"Use after an <if> or <else-if> tag to display content if those conditions do not match.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#if--else",
"https://markojs.com/docs/reference/core-tag#if--else",
},
],
};
@ -370,7 +370,7 @@ function assertHasPrecedingCondition(tag: t.NodePath<t.MarkoTag>) {
(getTagName(prev) !== "else" && !prev.node.attributes.length)
) {
throw tag.buildCodeFrameError(
`The [\`<${getTagName(tag)}>\` tag](https://next.markojs.com/docs/reference/core-tag#if--else) must have a preceding \`<if=cond>\` or \`<else if=cond>\`.`,
`The [\`<${getTagName(tag)}>\` tag](https://markojs.com/docs/reference/core-tag#if--else) must have a preceding \`<if=cond>\` or \`<else if=cond>\`.`,
);
}
}
@ -380,7 +380,7 @@ function assertHasBody(tag: t.NodePath<t.MarkoTag>) {
throw tag
.get("name")
.buildCodeFrameError(
`The [\`${getTagName(tag)}\` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires [body content](https://next.markojs.com/docs/reference/language#tag-content).`,
`The [\`${getTagName(tag)}\` tag](https://markojs.com/docs/reference/core-tag#if--else) requires [body content](https://markojs.com/docs/reference/language#tag-content).`,
);
}
}
@ -393,14 +393,14 @@ function assertHasValueAttribute(tag: t.NodePath<t.MarkoTag>) {
throw tag
.get("name")
.buildCodeFrameError(
`The [\`${getTagName(tag)}\` tag](https://next.markojs.com/docs/reference/core-tag#if--else) requires a [\`value=\` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).`,
`The [\`${getTagName(tag)}\` tag](https://markojs.com/docs/reference/core-tag#if--else) requires a [\`value=\` attribute](https://markojs.com/docs/reference/language#shorthand-value).`,
);
}
if (node.attributes.length > 1) {
const start = node.attributes[1].loc?.start;
const end = node.attributes[node.attributes.length - 1].loc?.end;
const msg = `The [\`${getTagName(tag)}\` tag](https://next.markojs.com/docs/reference/core-tag#if--else) only supports the [\`value=\` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).`;
const msg = `The [\`${getTagName(tag)}\` tag](https://markojs.com/docs/reference/core-tag#if--else) only supports the [\`value=\` attribute](https://markojs.com/docs/reference/language#shorthand-value).`;
if (start == null || end == null) {
throw tag.get("name").buildCodeFrameError(msg);
@ -424,7 +424,7 @@ function assertOptionalIfAttribute(tag: t.NodePath<t.MarkoTag>) {
) {
const start = node.attributes[1].loc?.start;
const end = node.attributes[node.attributes.length - 1].loc?.end;
const msg = `The [\`${getTagName(tag)}\` tag](https://next.markojs.com/docs/reference/core-tag#if--else) only supports an \`if=\` attribute.`;
const msg = `The [\`${getTagName(tag)}\` tag](https://markojs.com/docs/reference/core-tag#if--else) only supports an \`if=\` attribute.`;
if (start == null || end == null) {
throw tag.get("name").buildCodeFrameError(msg);

View File

@ -48,7 +48,7 @@ export default {
const start = attr.loc?.start;
const end = attr.loc?.end;
const msg =
"The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value) and its change handler.";
"The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value) and its change handler.";
if (start == null || end == null) {
throw tag.get("name").buildCodeFrameError(msg);
@ -72,7 +72,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) requires a [tag variable](https://next.markojs.com/docs/reference/language#tag-variables).",
"The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) requires a [tag variable](https://markojs.com/docs/reference/language#tag-variables).",
);
}
@ -80,7 +80,7 @@ export default {
throw tag
.get("var")
.buildCodeFrameError(
"The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) variable cannot be destructured.",
"The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) variable cannot be destructured.",
);
}
@ -90,7 +90,7 @@ export default {
.find((attr) => attr.node === valueChangeAttr)!
.get("value")
.buildCodeFrameError(
"The [`<let>` tag](https://next.markojs.com/docs/reference/core-tag#let) [`valueChange=` attribute](https://next.markojs.com/docs/reference/core-tag#controllable-let) must be a function.",
"The [`<let>` tag](https://markojs.com/docs/reference/core-tag#let) [`valueChange=` attribute](https://markojs.com/docs/reference/core-tag#controllable-let) must be a function.",
);
}
@ -170,8 +170,7 @@ export default {
autocomplete: [
{
description: "Use to create a mutable binding.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#let",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#let",
},
],
types: runtimeInfo.name + "/tags/let.d.marko",

View File

@ -58,7 +58,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<lifecycle>` tag](https://next.markojs.com/docs/reference/core-tag#lifecycle) requires at least one attribute.",
"The [`<lifecycle>` tag](https://markojs.com/docs/reference/core-tag#lifecycle) requires at least one attribute.",
);
}
@ -67,7 +67,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<lifecycle>` tag](https://next.markojs.com/docs/reference/core-tag#lifecycle) does not support [`...spread` attributes](https://next.markojs.com/docs/reference/language#spread-attributes).",
"The [`<lifecycle>` tag](https://markojs.com/docs/reference/core-tag#lifecycle) does not support [`...spread` attributes](https://markojs.com/docs/reference/language#spread-attributes).",
);
}
(attr.value.extra ??= {}).isEffect = true;
@ -117,7 +117,7 @@ export default {
{
description: "Use to create a side effects.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#lifecycle",
"https://markojs.com/docs/reference/core-tag#lifecycle",
},
],
types: runtimeInfo.name + "/tags/lifecycle.d.marko",

View File

@ -24,7 +24,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<log>` tag](https://next.markojs.com/docs/reference/core-tag#log) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<log>` tag](https://markojs.com/docs/reference/core-tag#log) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
@ -36,7 +36,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<log>` tag](https://next.markojs.com/docs/reference/core-tag#log) only supports the [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<log>` tag](https://markojs.com/docs/reference/core-tag#log) only supports the [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
},
@ -70,8 +70,7 @@ export default {
autocomplete: [
{
description: "Use to log a value to the console.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#log",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#log",
},
],
types: runtimeInfo.name + "/tags/log.d.marko",

View File

@ -42,13 +42,13 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<return>` tag](https://next.markojs.com/docs/reference/core-tag#return) can not be used in a [native tag](https://next.markojs.com/docs/reference/native-tag).",
"The [`<return>` tag](https://markojs.com/docs/reference/core-tag#return) can not be used in a [native tag](https://markojs.com/docs/reference/native-tag).",
);
} else if (isControlFlowTag(parentTag)) {
throw tag
.get("name")
.buildCodeFrameError(
`The [\`<return>\` tag](https://next.markojs.com/docs/reference/core-tag#return) can not be used under the \`<${parentTag.get("name").toString()}>\` tag.`,
`The [\`<return>\` tag](https://markojs.com/docs/reference/core-tag#return) can not be used under the \`<${parentTag.get("name").toString()}>\` tag.`,
);
}
}
@ -57,7 +57,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
`Cannot have multiple [\`<return>\` tags](https://next.markojs.com/docs/reference/core-tag#return) ${tag.parent.type === "Program" ? "for the template" : "within a tag's body content"}.`,
`Cannot have multiple [\`<return>\` tags](https://markojs.com/docs/reference/core-tag#return) ${tag.parent.type === "Program" ? "for the template" : "within a tag's body content"}.`,
);
} else {
tagsWithReturn.add(tag.parentPath);
@ -68,7 +68,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<return>` tag](https://next.markojs.com/docs/reference/core-tag#return) requires a [`value=` attribute](https://next.markojs.com/docs/reference/language#shorthand-value).",
"The [`<return>` tag](https://markojs.com/docs/reference/core-tag#return) requires a [`value=` attribute](https://markojs.com/docs/reference/language#shorthand-value).",
);
}
@ -152,8 +152,7 @@ export default {
displayText: "return=<value>",
description: "Provides a value for use in a parent template.",
snippet: "return=${1:value}",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#return",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#return",
},
],
} as Tag;

View File

@ -18,7 +18,7 @@ import { skip, traverseContains } from "../util/traverse";
import { scopeIdentifier } from "../visitors/program";
const htmlScriptTagAlternateMsg =
" For a native html [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.";
" For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.";
export default {
parse(tag) {
@ -30,7 +30,7 @@ export default {
if (child.type !== "MarkoText") {
throw tag.hub.file.hub.buildError(
child,
"Unexpected content in [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported." +
"Unexpected content in [`<script>` tag](https://markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported." +
htmlScriptTagAlternateMsg,
SyntaxError,
);
@ -66,7 +66,7 @@ export default {
if (node.var) {
throw tag.hub.buildError(
node.var,
"The [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) does not support a tag variable reference." +
"The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support a tag variable reference." +
htmlScriptTagAlternateMsg,
);
}
@ -83,7 +83,7 @@ export default {
} else {
throw tag.hub.buildError(
attr,
"The [`<script>` tag](https://next.markojs.com/docs/reference/core-tag#script) does not support html attributes." +
"The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support html attributes." +
htmlScriptTagAlternateMsg,
);
}

View File

@ -16,7 +16,7 @@ import { getMarkoOpts } from "../util/marko-config";
const STYLE_EXT_REG = /^style((?:\.[a-zA-Z0-9$_-]+)+)?/;
const htmlStyleTagAlternateMsg =
" For a native html [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.";
" For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.";
export default {
analyze(tag) {
@ -48,7 +48,7 @@ export default {
if (child.type !== "MarkoText") {
throw tag.hub.buildError(
child,
"The [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) currently only supports static content." +
"The [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) currently only supports static content." +
htmlStyleTagAlternateMsg,
);
}
@ -57,7 +57,7 @@ export default {
if (node.body.body.length > 1) {
throw tag.hub.buildError(
node.name,
"The [`<style>` tag](https://next.markojs.com/docs/reference/core-tag#style) currently only supports static content." +
"The [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) currently only supports static content." +
htmlStyleTagAlternateMsg,
);
}

View File

@ -72,7 +72,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"The [`<try>` tag](https://next.markojs.com/docs/reference/core-tag#try) requires [body content](https://next.markojs.com/docs/reference/language#tag-content).",
"The [`<try>` tag](https://markojs.com/docs/reference/core-tag#try) requires [body content](https://markojs.com/docs/reference/language#tag-content).",
);
}
@ -197,8 +197,7 @@ export default {
{
description:
"Used to capture errors and display placeholders for nested content.",
descriptionMoreURL:
"https://next.markojs.com/docs/reference/core-tag#try",
descriptionMoreURL: "https://markojs.com/docs/reference/core-tag#try",
},
],
types: runtimeInfo.name + "/tags/try.d.marko",

View File

@ -5,7 +5,7 @@ export function assertNoSpreadAttrs(tag: t.NodePath<t.MarkoTag>) {
if (attr.isMarkoSpreadAttribute()) {
const tagName = (tag.get("name").node as t.StringLiteral).value;
throw attr.buildCodeFrameError(
`The [\`<${tagName}>\`](https://next.markojs.com/docs/reference/core-tag#${tagName}) tag does not support \`...spread\` attributes.`,
`The [\`<${tagName}>\`](https://markojs.com/docs/reference/core-tag#${tagName}) tag does not support \`...spread\` attributes.`,
);
}
}
@ -16,7 +16,7 @@ export function assertNoBodyContent(tag: t.NodePath<t.MarkoTag>) {
const tagName = tag.get("name");
const tagNameLiteral = (tagName.node as t.StringLiteral).value;
throw tagName.buildCodeFrameError(
`The [\`<${tagNameLiteral}>\`](https://next.markojs.com/docs/reference/core-tag#${tagNameLiteral}) tag does not support body content.`,
`The [\`<${tagNameLiteral}>\`](https://markojs.com/docs/reference/core-tag#${tagNameLiteral}) tag does not support body content.`,
);
}
}

View File

@ -24,7 +24,7 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
"[Attribute tags](https://next.markojs.com/docs/reference/language#attribute-tags) must be nested within another tag.",
"[Attribute tags](https://markojs.com/docs/reference/language#attribute-tags) must be nested within another tag.",
);
}
},

View File

@ -117,13 +117,13 @@ export default {
throw tag
.get("name")
.buildCodeFrameError(
`Local variables must be in a [dynamic tag](https://next.markojs.com/docs/reference/language#dynamic-tags) unless they are PascalCase. Use \`<\${${tagName}}/>\` or rename to \`${tagName.charAt(0).toUpperCase() + tagName.slice(1)}\`.`,
`Local variables must be in a [dynamic tag](https://markojs.com/docs/reference/language#dynamic-tags) unless they are PascalCase. Use \`<\${${tagName}}/>\` or rename to \`${tagName.charAt(0).toUpperCase() + tagName.slice(1)}\`.`,
);
}
throw tag
.get("name")
.buildCodeFrameError(
`Unable to find entry point for [custom tag](https://next.markojs.com/docs/reference/custom-tag#relative-custom-tags) \`<${tagName}>\`.`,
`Unable to find entry point for [custom tag](https://markojs.com/docs/reference/custom-tag#relative-custom-tags) \`<${tagName}>\`.`,
);
}
@ -534,13 +534,13 @@ export function getTagRelativePath(tag: t.NodePath<t.MarkoTag>) {
throw tag
.get("name")
.buildCodeFrameError(
`Local variables must be in a [dynamic tag](https://next.markojs.com/docs/reference/language#dynamic-tags) unless they are PascalCase. Use \`<\${${tagName}}/>\` or rename to \`${tagName.charAt(0).toUpperCase() + tagName.slice(1)}\`.`,
`Local variables must be in a [dynamic tag](https://markojs.com/docs/reference/language#dynamic-tags) unless they are PascalCase. Use \`<\${${tagName}}/>\` or rename to \`${tagName.charAt(0).toUpperCase() + tagName.slice(1)}\`.`,
);
}
throw tag
.get("name")
.buildCodeFrameError(
`Unable to find entry point for [custom tag](https://next.markojs.com/docs/reference/custom-tag#relative-custom-tags) \`<${tagName}>\`.`,
`Unable to find entry point for [custom tag](https://markojs.com/docs/reference/custom-tag#relative-custom-tags) \`<${tagName}>\`.`,
);
}

View File

@ -125,7 +125,7 @@ export default {
throw tag
.get("var")
.buildCodeFrameError(
"Tag variables on [native tags](https://next.markojs.com/docs/reference/native-tag) cannot be destructured.",
"Tag variables on [native tags](https://markojs.com/docs/reference/native-tag) cannot be destructured.",
);
}