An exception occurred when parsing an unclosed label using htm, but no error was reported.This leads to the wrong virtual dom object
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu bằng cách chạy bản tái hiện JavaScript được cung cấp với htm.bind(h) và so sánh đầu ra virtual DOM của nó với JSON mong đợi. Theo dõi cách tagged template phân tích các phần tử meta và link chưa được đóng; hoàn tất khi các phần tử đó vẫn tự đóng và các phần tử con của head giữ nguyên cấu trúc được示, mà không có lỗi parsing không được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
An exception occurred when parsing an unclosed label using htm, but no error was reported.
This leads to the wrong virtual dom object.
An exception occurred when parsing an unclosed label with "htm", but no error was reported.
This resulted in the wrong "virtual dom" object.
(async () => {
function h(type, props, ...children) {
return {
type,
props,
children
};
}
const {default: htm} = await import('https://unpkg.com/htm?module');
const html = htm.bind(h);
return html;
})().then(html => {
return html`
<head>
<meta charset="utf-8" >
<meta name="viewport" content="width=device-width,initial-scale=1" >
<meta name="theme-color" content="#ffffff" >
<title>masx200的github主页-首页</title>
<!--[if IE]>
<script src="https://cdn.bootcss.com/babel-polyfill/7.4.4/polyfill.min.js"></script>
<![endif]-->
<script
nomodule=""
src="https://cdn.jsdelivr.net/gh/masx200/webpack-react-vue-spa-awesome-config@2.4.0/lib/polyfill.min.js"
></script>
<link
href="https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/main.b9c7ffd191cff11a9b96.css"
rel="stylesheet"
>
<script
charset="utf-8"
src="https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.6.c2cea2c684fac63ffae0.js"
></script>
<script
charset="utf-8"
src="https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.22.ca40a5fe169fbc33ccf0.js"
></script>
<script
charset="utf-8"
src="https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.0.1284ce7c8750a8cfed29.js"
></script>
<script
charset="utf-8"
src="https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.13.9d669a3554ec48651e33.js"
></script>
<script
charset="utf-8"
src="https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.14.64cca74158382392b422.js"
></script>
</head>
`;
}).then(temp1 => {
console.log(JSON.stringify(temp1, null, 4));
});
The 'meta' and 'link' tags above are not closed
The 'meta' and 'link' tags above are not closed
An exception occurred !
[
"meta",
{
"name": "theme-color",
"content": "#ffffff"
},
{
"type": "title",
"props": null,
"children": [
"masx200的github主页-首页"
]
},
{
"type": "script",
"props": {
"nomodule": "",
"src": "https://cdn.jsdelivr.net/gh/masx200/webpack-react-vue-spa-awesome-config@2.4.0/lib/polyfill.min.js"
},
"children": []
},
{
"type": "link",
"props": {
"href": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/main.b9c7ffd191cff11a9b96.css",
"rel": "stylesheet"
},
"children": [
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.6.c2cea2c684fac63ffae0.js"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.22.ca40a5fe169fbc33ccf0.js"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.0.1284ce7c8750a8cfed29.js"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.13.9d669a3554ec48651e33.js"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.14.64cca74158382392b422.js"
},
"children": []
}
]
}
]
The correct output should look like this.
The correct output should look like this.
{
"type": "head",
"props": null,
"children": [
{
"type": "meta",
"props": {
"charset": "utf-8"
},
"children": []
},
{
"type": "meta",
"props": {
"name": "viewport",
"content": "width=device-width,initial-scale=1"
},
"children": []
},
{
"type": "meta",
"props": {
"name": "theme-color",
"content": "#ffffff"
},
"children": []
},
{
"type": "title",
"props": null,
"children": [
"masx200的github主页-首页"
]
},
{
"type": "script",
"props": {
"nomodule": "",
"src": "https://cdn.jsdelivr.net/gh/masx200/webpack-react-vue-spa-awesome-config@2.4.0/lib/polyfill.min.js"
},
"children": []
},
{
"type": "link",
"props": {
"href": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/main.b9c7ffd191cff11a9b96.css",
"rel": "stylesheet"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.6.c2cea2c684fac63ffae0.js"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.22.ca40a5fe169fbc33ccf0.js"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.0.1284ce7c8750a8cfed29.js"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.13.9d669a3554ec48651e33.js"
},
"children": []
},
{
"type": "script",
"props": {
"charset": "utf-8",
"src": "https://cdn.jsdelivr.net/gh/masx200/masx200.github.io@4.3.3/chunk.14.64cca74158382392b422.js"
},
"children": []
}
]
}
- Ngôn ngữ chính
- JavaScript
- Star
- 9k
- Fork
- 181
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của developit/htm
-
Sarthak Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
-
Tugas Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
-
Tugas Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
-
type checking templates Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Tất cả issue của developit/htm
Issue tương tự
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Improve Title Support Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·