Improve runtime error handling for missing close tags
オープン
debugging
duplicate
enhancement
proposal
- 主要言語
- JavaScript
- スター
- 9k
- フォーク
- 181
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Consider this sample code, which accidentally omits a closing tag.
```js
import htm from 'https://unpkg.com/htm?module'
const h = (type, props, ...children) => ({type, props, children});
const html = htm.bind(h)
console.log(JSON.stringify(html`
Hello, world!`));
```
In this case, the user intended to include a closing tag ``, and so the user's desired logged result is `{"type":"h1","props":null,"children":["Hello, world!"]}`
Actual: `["h1","Hello, world!"]` The element name is incorrectly handled as a text node.
Expected: Throw an exception.
コントリビューションガイド
評価
この issue はまだ評価されていません。