leptris 1.9.369.1-aarch64-linux → 1.9.370.0-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +10 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/html/html_parse.c +19 -0
- data/vendor-src/libleptris/test/html/test_html.cpp +64 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3d358fab2e812dfe82e177d601ca62c5e43e3392582a47569de67dd19f9dd78
|
|
4
|
+
data.tar.gz: 7d4ec42ca0d1024740566a2c76b5078db549ff372fc4d31c86a6e21abd096581
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2aa939744bd1bfdcb74978308bf337ef3fc93fdb9a1427683c9d6d9cb6d37de346b447f4c3e184cc9853eb7797dc106529a404b518aacdceafecd1dd0da7c0d4
|
|
7
|
+
data.tar.gz: 47d69f33b7b5b4ced5b5bcb17888e594d4e107fd32bc8ee8619ed3ef2df8b769396778a73ada8ae4b0720e15d945f87bb7a473783b8f3fb11cc8e80b9a9d5a3c
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
8
8
|
# Pin for `rake compile` and the platform-gem builds. Keep in lockstep
|
|
9
9
|
# with .github/workflows/build.yml (which calls `rake compile`) and the
|
|
10
10
|
# CHANGELOG when libleptris releases.
|
|
11
|
-
LIBLEPTRIS_VERSION = "1.9.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.370"
|
|
12
12
|
# Vendored alongside libleptris for fn:normalize-unicode (TODO
|
|
13
13
|
# .restructure/20): built per platform with a RELOCATABLE @rpath
|
|
14
14
|
# install name, loaded by ffi.rb before libleptris so the
|
data/lib/leptris/version.rb
CHANGED
data/lib/libleptris.so
CHANGED
|
Binary file
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.370] - 2026-10-18
|
|
4
|
+
|
|
5
|
+
<!-- Edit this section with the actual release notes. -->
|
|
6
|
+
<!-- See https://keepachangelog.com for format guidance. -->
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- (describe changes here)
|
|
11
|
+
|
|
12
|
+
|
|
3
13
|
## [1.9.369] - 2026-10-18
|
|
4
14
|
|
|
5
15
|
### Added
|
|
@@ -4890,6 +4890,14 @@ static void h_split_head_body(HBuilder* b, LeptrisElement html,
|
|
|
4890
4890
|
int hty = leptris_node_get_type(head_end);
|
|
4891
4891
|
if (hty == LEPTRIS_NODE_TYPE_COMMENT ||
|
|
4892
4892
|
hty == LEPTRIS_NODE_TYPE_PI) {
|
|
4893
|
+
/* leptris#389: once a structural <body> token has
|
|
4894
|
+
* opened the in-body window, a comment is BODY
|
|
4895
|
+
* content (13.2.6.4.4 inserts at the current node)
|
|
4896
|
+
* — end the head run here so the comment leads the
|
|
4897
|
+
* rest into the body, instead of joining the head
|
|
4898
|
+
* run or the after-head deferral. */
|
|
4899
|
+
if (b->body_tag_seen)
|
|
4900
|
+
break;
|
|
4893
4901
|
if (b->whatwg_head_set) {
|
|
4894
4902
|
if (past_head_end) {
|
|
4895
4903
|
/* After </head>: the comment is an html
|
|
@@ -5221,6 +5229,16 @@ head_end = leptris_node_get_next_sibling(head_end);
|
|
|
5221
5229
|
if (b->whatwg_head_set && !b->frameset &&
|
|
5222
5230
|
(rest || b->head_end_seen)) {
|
|
5223
5231
|
if (b->head_end_seen) {
|
|
5232
|
+
/* leptris#389: a structural <body> start tag opens the
|
|
5233
|
+
* in-body window — comments after it insert at the
|
|
5234
|
+
* current node (13.2.6.4.4 in-body comment insertion)
|
|
5235
|
+
* and belong INSIDE the body. The after-head front
|
|
5236
|
+
* peel (13.2.6.4.6) only governs the pre-body window;
|
|
5237
|
+
* once body_tag_seen armed the body, leading comments
|
|
5238
|
+
* of the rest stay body content. The head-commit and
|
|
5239
|
+
* after-body peel below stay unconditional. */
|
|
5240
|
+
int in_body_window = b->body_tag_seen;
|
|
5241
|
+
if (!in_body_window) {
|
|
5224
5242
|
/* Front peel: leading comments/PIs of the rest. Uses
|
|
5225
5243
|
* its OWN last-marker so the ws-registered suffix
|
|
5226
5244
|
* segment is MERGED (ws first, then comments), never
|
|
@@ -5254,6 +5272,7 @@ head_end = leptris_node_get_next_sibling(head_end);
|
|
|
5254
5272
|
suffix_first = peel_first;
|
|
5255
5273
|
suffix_last = peel_last;
|
|
5256
5274
|
}
|
|
5275
|
+
}
|
|
5257
5276
|
/* A comment tokenized BEFORE </html> but after
|
|
5258
5277
|
* </body> rides in the rest - peel the trailing run
|
|
5259
5278
|
* to the html level, exactly like the </body>-only
|
|
@@ -10,6 +10,10 @@ extern "C" {
|
|
|
10
10
|
#include <cstring>
|
|
11
11
|
#include <string>
|
|
12
12
|
|
|
13
|
+
static bool h389_ieq(const char* a, const char* b) {
|
|
14
|
+
return a && b && strcmp(a, b) == 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
namespace {
|
|
14
18
|
|
|
15
19
|
/* Tree-shape dumps force the XML method (ext.html_method = -1,
|
|
@@ -2270,3 +2274,63 @@ TEST(HtmlParse, SetTextSurvivesSerialization) {
|
|
|
2270
2274
|
leptris_document_free(doc);
|
|
2271
2275
|
}
|
|
2272
2276
|
}
|
|
2277
|
+
|
|
2278
|
+
/* leptris#389: a comment token following ignored <html>/<body>
|
|
2279
|
+
* start tags must insert at the current node (WHATWG 13.2.6.4.4
|
|
2280
|
+
* in-body comment insertion) — the ignored start tags do not
|
|
2281
|
+
* change where subsequent comments land, and the after-head
|
|
2282
|
+
* front-peel (13.2.6.4.6) does not govern the in-body window.
|
|
2283
|
+
* The structural <body> handler only stashes attributes; the
|
|
2284
|
+
* body materializes at the split, and the comment must ride the
|
|
2285
|
+
* rest INTO it — not peel to the html level (which orphaned it
|
|
2286
|
+
* when the split short-circuited on the explicit-body walk). */
|
|
2287
|
+
TEST(HtmlParse, InBodyCommentAfterIgnoredStructuralStartTags) {
|
|
2288
|
+
LeptrisStatus st;
|
|
2289
|
+
const char* doc1 =
|
|
2290
|
+
"<body><html><body><!-- c --><p>Test</p></body></html></body>";
|
|
2291
|
+
LeptrisDocument d = leptris_parse_html_string(doc1, strlen(doc1), &st);
|
|
2292
|
+
ASSERT_NE(d, nullptr);
|
|
2293
|
+
LeptrisElement body = nullptr;
|
|
2294
|
+
for (LeptrisNodeRef c = leptris_node_first_child(
|
|
2295
|
+
(LeptrisNodeRef)leptris_document_root(d));
|
|
2296
|
+
c; c = leptris_node_next_sibling((LeptrisNodeRef)c))
|
|
2297
|
+
if (leptris_node_get_type(c) == LEPTRIS_NODE_TYPE_ELEMENT &&
|
|
2298
|
+
h389_ieq(leptris_element_name((LeptrisElement)c), "body"))
|
|
2299
|
+
body = (LeptrisElement)c;
|
|
2300
|
+
ASSERT_NE(body, nullptr);
|
|
2301
|
+
int comments = 0, elems = 0;
|
|
2302
|
+
for (LeptrisNodeRef c = leptris_node_first_child(
|
|
2303
|
+
(LeptrisNodeRef)body);
|
|
2304
|
+
c; c = leptris_node_next_sibling((LeptrisNodeRef)c)) {
|
|
2305
|
+
if (leptris_node_get_type(c) == LEPTRIS_NODE_TYPE_COMMENT)
|
|
2306
|
+
comments++;
|
|
2307
|
+
if (leptris_node_get_type(c) == LEPTRIS_NODE_TYPE_ELEMENT)
|
|
2308
|
+
elems++;
|
|
2309
|
+
}
|
|
2310
|
+
EXPECT_EQ(comments, 1);
|
|
2311
|
+
EXPECT_EQ(elems, 1);
|
|
2312
|
+
leptris_document_free(d);
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
TEST(HtmlParse, InBodyCommentBodyFirstShape) {
|
|
2316
|
+
LeptrisStatus st;
|
|
2317
|
+
const char* doc1 = "<body><!-- c --><p>Test</p>";
|
|
2318
|
+
LeptrisDocument d = leptris_parse_html_string(doc1, strlen(doc1), &st);
|
|
2319
|
+
ASSERT_NE(d, nullptr);
|
|
2320
|
+
LeptrisElement body = nullptr;
|
|
2321
|
+
for (LeptrisNodeRef c = leptris_node_first_child(
|
|
2322
|
+
(LeptrisNodeRef)leptris_document_root(d));
|
|
2323
|
+
c; c = leptris_node_next_sibling((LeptrisNodeRef)c))
|
|
2324
|
+
if (leptris_node_get_type(c) == LEPTRIS_NODE_TYPE_ELEMENT &&
|
|
2325
|
+
h389_ieq(leptris_element_name((LeptrisElement)c), "body"))
|
|
2326
|
+
body = (LeptrisElement)c;
|
|
2327
|
+
ASSERT_NE(body, nullptr);
|
|
2328
|
+
int comments = 0;
|
|
2329
|
+
for (LeptrisNodeRef c = leptris_node_first_child(
|
|
2330
|
+
(LeptrisNodeRef)body);
|
|
2331
|
+
c; c = leptris_node_next_sibling((LeptrisNodeRef)c))
|
|
2332
|
+
if (leptris_node_get_type(c) == LEPTRIS_NODE_TYPE_COMMENT)
|
|
2333
|
+
comments++;
|
|
2334
|
+
EXPECT_EQ(comments, 1);
|
|
2335
|
+
leptris_document_free(d);
|
|
2336
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
|
3
3
|
"name": "leptris",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.370",
|
|
5
5
|
"description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
|
|
6
6
|
"homepage": "https://github.com/leptris/leptris",
|
|
7
7
|
"license": "MIT",
|