selma 0.4.15 → 0.5.1
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/Cargo.lock +145 -179
- data/README.md +1 -0
- data/ext/selma/Cargo.toml +1 -1
- data/ext/selma/src/html/element.rs +68 -15
- data/ext/selma/src/html/end_tag.rs +3 -2
- data/ext/selma/src/html/text_chunk.rs +13 -11
- data/ext/selma/src/html.rs +3 -6
- data/ext/selma/src/lib.rs +7 -4
- data/ext/selma/src/native_ref_wrap.rs +1 -1
- data/ext/selma/src/rewriter.rs +103 -103
- data/ext/selma/src/sanitizer.rs +20 -20
- data/ext/selma/src/selector.rs +15 -15
- data/lib/selma/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed5dccbff7a289d57157e0ce627e31ed233ba316d6989ab14bfc6a9f28d241ec
|
|
4
|
+
data.tar.gz: de7de41bb7cd201f866515e3ef730491d435c90610e771dac5f928e1ca2e8688
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 488c6240447f302b3479a20b76e17552648399dc82a465ddd0bf3d59cb058ec095a5ceae57a4f5cfef1a3865f6e765d2fdc4a94d79796f5d654d115982c53755
|
|
7
|
+
data.tar.gz: 371014f6ed8074097f1d7fd0c0c9600bbe7a5284248c7e7fdca6db9e4a5e26c4e565e3f20fa2c61612ad3a2ef199a8e8d87dc2103dbb987aa393e53f1f95e00d
|
data/Cargo.lock
CHANGED
|
@@ -4,9 +4,9 @@ version = 3
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "aho-corasick"
|
|
7
|
-
version = "1.1.
|
|
7
|
+
version = "1.1.4"
|
|
8
8
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
-
checksum = "
|
|
9
|
+
checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
|
|
10
10
|
dependencies = [
|
|
11
11
|
"memchr",
|
|
12
12
|
]
|
|
@@ -19,29 +19,27 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
|
|
19
19
|
|
|
20
20
|
[[package]]
|
|
21
21
|
name = "bindgen"
|
|
22
|
-
version = "0.
|
|
22
|
+
version = "0.72.1"
|
|
23
23
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
-
checksum = "
|
|
24
|
+
checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
|
|
25
25
|
dependencies = [
|
|
26
26
|
"bitflags",
|
|
27
27
|
"cexpr",
|
|
28
28
|
"clang-sys",
|
|
29
29
|
"itertools",
|
|
30
|
-
"lazy_static",
|
|
31
|
-
"lazycell",
|
|
32
30
|
"proc-macro2",
|
|
33
31
|
"quote",
|
|
34
32
|
"regex",
|
|
35
|
-
"rustc-hash
|
|
33
|
+
"rustc-hash",
|
|
36
34
|
"shlex",
|
|
37
35
|
"syn",
|
|
38
36
|
]
|
|
39
37
|
|
|
40
38
|
[[package]]
|
|
41
39
|
name = "bitflags"
|
|
42
|
-
version = "2.
|
|
40
|
+
version = "2.11.1"
|
|
43
41
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
44
|
-
checksum = "
|
|
42
|
+
checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
|
|
45
43
|
|
|
46
44
|
[[package]]
|
|
47
45
|
name = "cexpr"
|
|
@@ -54,9 +52,9 @@ dependencies = [
|
|
|
54
52
|
|
|
55
53
|
[[package]]
|
|
56
54
|
name = "cfg-if"
|
|
57
|
-
version = "1.0.
|
|
55
|
+
version = "1.0.4"
|
|
58
56
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
|
-
checksum = "
|
|
57
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
60
58
|
|
|
61
59
|
[[package]]
|
|
62
60
|
name = "clang-sys"
|
|
@@ -71,9 +69,9 @@ dependencies = [
|
|
|
71
69
|
|
|
72
70
|
[[package]]
|
|
73
71
|
name = "cssparser"
|
|
74
|
-
version = "0.
|
|
72
|
+
version = "0.36.0"
|
|
75
73
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
-
checksum = "
|
|
74
|
+
checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2"
|
|
77
75
|
dependencies = [
|
|
78
76
|
"cssparser-macros",
|
|
79
77
|
"dtoa-short",
|
|
@@ -94,29 +92,30 @@ dependencies = [
|
|
|
94
92
|
|
|
95
93
|
[[package]]
|
|
96
94
|
name = "derive_more"
|
|
97
|
-
version = "2.
|
|
95
|
+
version = "2.1.1"
|
|
98
96
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
99
|
-
checksum = "
|
|
97
|
+
checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134"
|
|
100
98
|
dependencies = [
|
|
101
99
|
"derive_more-impl",
|
|
102
100
|
]
|
|
103
101
|
|
|
104
102
|
[[package]]
|
|
105
103
|
name = "derive_more-impl"
|
|
106
|
-
version = "2.
|
|
104
|
+
version = "2.1.1"
|
|
107
105
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
108
|
-
checksum = "
|
|
106
|
+
checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb"
|
|
109
107
|
dependencies = [
|
|
110
108
|
"proc-macro2",
|
|
111
109
|
"quote",
|
|
110
|
+
"rustc_version",
|
|
112
111
|
"syn",
|
|
113
112
|
]
|
|
114
113
|
|
|
115
114
|
[[package]]
|
|
116
115
|
name = "dtoa"
|
|
117
|
-
version = "1.0.
|
|
116
|
+
version = "1.0.11"
|
|
118
117
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
-
checksum = "
|
|
118
|
+
checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590"
|
|
120
119
|
|
|
121
120
|
[[package]]
|
|
122
121
|
name = "dtoa-short"
|
|
@@ -129,9 +128,9 @@ dependencies = [
|
|
|
129
128
|
|
|
130
129
|
[[package]]
|
|
131
130
|
name = "either"
|
|
132
|
-
version = "1.
|
|
131
|
+
version = "1.15.0"
|
|
133
132
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
134
|
-
checksum = "
|
|
133
|
+
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
|
135
134
|
|
|
136
135
|
[[package]]
|
|
137
136
|
name = "encoding_rs"
|
|
@@ -170,9 +169,9 @@ dependencies = [
|
|
|
170
169
|
|
|
171
170
|
[[package]]
|
|
172
171
|
name = "equivalent"
|
|
173
|
-
version = "1.0.
|
|
172
|
+
version = "1.0.2"
|
|
174
173
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
175
|
-
checksum = "
|
|
174
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
176
175
|
|
|
177
176
|
[[package]]
|
|
178
177
|
name = "escapist"
|
|
@@ -183,6 +182,12 @@ dependencies = [
|
|
|
183
182
|
"entities",
|
|
184
183
|
]
|
|
185
184
|
|
|
185
|
+
[[package]]
|
|
186
|
+
name = "fastrand"
|
|
187
|
+
version = "2.4.1"
|
|
188
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
189
|
+
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
|
|
190
|
+
|
|
186
191
|
[[package]]
|
|
187
192
|
name = "foldhash"
|
|
188
193
|
version = "0.2.0"
|
|
@@ -191,15 +196,15 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
|
|
191
196
|
|
|
192
197
|
[[package]]
|
|
193
198
|
name = "glob"
|
|
194
|
-
version = "0.3.
|
|
199
|
+
version = "0.3.3"
|
|
195
200
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
196
|
-
checksum = "
|
|
201
|
+
checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
|
197
202
|
|
|
198
203
|
[[package]]
|
|
199
204
|
name = "hashbrown"
|
|
200
|
-
version = "0.
|
|
205
|
+
version = "0.17.1"
|
|
201
206
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
202
|
-
checksum = "
|
|
207
|
+
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
|
203
208
|
dependencies = [
|
|
204
209
|
"allocator-api2",
|
|
205
210
|
"equivalent",
|
|
@@ -208,18 +213,18 @@ dependencies = [
|
|
|
208
213
|
|
|
209
214
|
[[package]]
|
|
210
215
|
name = "itertools"
|
|
211
|
-
version = "0.
|
|
216
|
+
version = "0.13.0"
|
|
212
217
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
213
|
-
checksum = "
|
|
218
|
+
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
|
|
214
219
|
dependencies = [
|
|
215
220
|
"either",
|
|
216
221
|
]
|
|
217
222
|
|
|
218
223
|
[[package]]
|
|
219
224
|
name = "itoa"
|
|
220
|
-
version = "1.0.
|
|
225
|
+
version = "1.0.18"
|
|
221
226
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
222
|
-
checksum = "
|
|
227
|
+
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
223
228
|
|
|
224
229
|
[[package]]
|
|
225
230
|
name = "lazy_static"
|
|
@@ -227,44 +232,39 @@ version = "1.5.0"
|
|
|
227
232
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
228
233
|
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
229
234
|
|
|
230
|
-
[[package]]
|
|
231
|
-
name = "lazycell"
|
|
232
|
-
version = "1.3.0"
|
|
233
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
234
|
-
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
235
|
-
|
|
236
235
|
[[package]]
|
|
237
236
|
name = "libc"
|
|
238
|
-
version = "0.2.
|
|
237
|
+
version = "0.2.186"
|
|
239
238
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
240
|
-
checksum = "
|
|
239
|
+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
241
240
|
|
|
242
241
|
[[package]]
|
|
243
242
|
name = "libloading"
|
|
244
|
-
version = "0.8.
|
|
243
|
+
version = "0.8.9"
|
|
245
244
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
246
|
-
checksum = "
|
|
245
|
+
checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
|
|
247
246
|
dependencies = [
|
|
248
247
|
"cfg-if",
|
|
249
|
-
"windows-
|
|
248
|
+
"windows-link",
|
|
250
249
|
]
|
|
251
250
|
|
|
252
251
|
[[package]]
|
|
253
252
|
name = "log"
|
|
254
|
-
version = "0.4.
|
|
253
|
+
version = "0.4.29"
|
|
255
254
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
256
|
-
checksum = "
|
|
255
|
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
|
257
256
|
|
|
258
257
|
[[package]]
|
|
259
258
|
name = "lol_html"
|
|
260
|
-
version = "
|
|
259
|
+
version = "3.0.0"
|
|
261
260
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
262
|
-
checksum = "
|
|
261
|
+
checksum = "2ae574a677ef0443a0bd3c291f0cab9d1e61a3ad85a1515e3cfc0bc720d5a48e"
|
|
263
262
|
dependencies = [
|
|
264
263
|
"bitflags",
|
|
265
264
|
"cfg-if",
|
|
266
265
|
"cssparser",
|
|
267
266
|
"encoding_rs",
|
|
267
|
+
"foldhash",
|
|
268
268
|
"hashbrown",
|
|
269
269
|
"memchr",
|
|
270
270
|
"mime",
|
|
@@ -298,9 +298,9 @@ dependencies = [
|
|
|
298
298
|
|
|
299
299
|
[[package]]
|
|
300
300
|
name = "memchr"
|
|
301
|
-
version = "2.
|
|
301
|
+
version = "2.8.0"
|
|
302
302
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
303
|
-
checksum = "
|
|
303
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
304
304
|
|
|
305
305
|
[[package]]
|
|
306
306
|
name = "mime"
|
|
@@ -332,19 +332,20 @@ dependencies = [
|
|
|
332
332
|
|
|
333
333
|
[[package]]
|
|
334
334
|
name = "phf"
|
|
335
|
-
version = "0.
|
|
335
|
+
version = "0.13.1"
|
|
336
336
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
337
|
-
checksum = "
|
|
337
|
+
checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
|
|
338
338
|
dependencies = [
|
|
339
339
|
"phf_macros",
|
|
340
340
|
"phf_shared",
|
|
341
|
+
"serde",
|
|
341
342
|
]
|
|
342
343
|
|
|
343
344
|
[[package]]
|
|
344
345
|
name = "phf_codegen"
|
|
345
|
-
version = "0.
|
|
346
|
+
version = "0.13.1"
|
|
346
347
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
347
|
-
checksum = "
|
|
348
|
+
checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"
|
|
348
349
|
dependencies = [
|
|
349
350
|
"phf_generator",
|
|
350
351
|
"phf_shared",
|
|
@@ -352,19 +353,19 @@ dependencies = [
|
|
|
352
353
|
|
|
353
354
|
[[package]]
|
|
354
355
|
name = "phf_generator"
|
|
355
|
-
version = "0.
|
|
356
|
+
version = "0.13.1"
|
|
356
357
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
357
|
-
checksum = "
|
|
358
|
+
checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
|
|
358
359
|
dependencies = [
|
|
360
|
+
"fastrand",
|
|
359
361
|
"phf_shared",
|
|
360
|
-
"rand",
|
|
361
362
|
]
|
|
362
363
|
|
|
363
364
|
[[package]]
|
|
364
365
|
name = "phf_macros"
|
|
365
|
-
version = "0.
|
|
366
|
+
version = "0.13.1"
|
|
366
367
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
367
|
-
checksum = "
|
|
368
|
+
checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef"
|
|
368
369
|
dependencies = [
|
|
369
370
|
"phf_generator",
|
|
370
371
|
"phf_shared",
|
|
@@ -375,9 +376,9 @@ dependencies = [
|
|
|
375
376
|
|
|
376
377
|
[[package]]
|
|
377
378
|
name = "phf_shared"
|
|
378
|
-
version = "0.
|
|
379
|
+
version = "0.13.1"
|
|
379
380
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
380
|
-
checksum = "
|
|
381
|
+
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
|
|
381
382
|
dependencies = [
|
|
382
383
|
"siphasher",
|
|
383
384
|
]
|
|
@@ -390,51 +391,36 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
|
|
390
391
|
|
|
391
392
|
[[package]]
|
|
392
393
|
name = "proc-macro2"
|
|
393
|
-
version = "1.0.
|
|
394
|
+
version = "1.0.106"
|
|
394
395
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
395
|
-
checksum = "
|
|
396
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
396
397
|
dependencies = [
|
|
397
398
|
"unicode-ident",
|
|
398
399
|
]
|
|
399
400
|
|
|
400
401
|
[[package]]
|
|
401
402
|
name = "quote"
|
|
402
|
-
version = "1.0.
|
|
403
|
+
version = "1.0.45"
|
|
403
404
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
404
|
-
checksum = "
|
|
405
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
405
406
|
dependencies = [
|
|
406
407
|
"proc-macro2",
|
|
407
408
|
]
|
|
408
409
|
|
|
409
|
-
[[package]]
|
|
410
|
-
name = "rand"
|
|
411
|
-
version = "0.8.5"
|
|
412
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
413
|
-
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
|
414
|
-
dependencies = [
|
|
415
|
-
"rand_core",
|
|
416
|
-
]
|
|
417
|
-
|
|
418
|
-
[[package]]
|
|
419
|
-
name = "rand_core"
|
|
420
|
-
version = "0.6.4"
|
|
421
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
422
|
-
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
|
423
|
-
|
|
424
410
|
[[package]]
|
|
425
411
|
name = "rb-sys"
|
|
426
|
-
version = "0.9.
|
|
412
|
+
version = "0.9.128"
|
|
427
413
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
428
|
-
checksum = "
|
|
414
|
+
checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
|
|
429
415
|
dependencies = [
|
|
430
416
|
"rb-sys-build",
|
|
431
417
|
]
|
|
432
418
|
|
|
433
419
|
[[package]]
|
|
434
420
|
name = "rb-sys-build"
|
|
435
|
-
version = "0.9.
|
|
421
|
+
version = "0.9.128"
|
|
436
422
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
437
|
-
checksum = "
|
|
423
|
+
checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
|
|
438
424
|
dependencies = [
|
|
439
425
|
"bindgen",
|
|
440
426
|
"lazy_static",
|
|
@@ -447,15 +433,15 @@ dependencies = [
|
|
|
447
433
|
|
|
448
434
|
[[package]]
|
|
449
435
|
name = "rb-sys-env"
|
|
450
|
-
version = "0.2.
|
|
436
|
+
version = "0.2.3"
|
|
451
437
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
452
|
-
checksum = "
|
|
438
|
+
checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
|
|
453
439
|
|
|
454
440
|
[[package]]
|
|
455
441
|
name = "regex"
|
|
456
|
-
version = "1.
|
|
442
|
+
version = "1.12.3"
|
|
457
443
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
458
|
-
checksum = "
|
|
444
|
+
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
|
|
459
445
|
dependencies = [
|
|
460
446
|
"aho-corasick",
|
|
461
447
|
"memchr",
|
|
@@ -465,9 +451,9 @@ dependencies = [
|
|
|
465
451
|
|
|
466
452
|
[[package]]
|
|
467
453
|
name = "regex-automata"
|
|
468
|
-
version = "0.4.
|
|
454
|
+
version = "0.4.14"
|
|
469
455
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
470
|
-
checksum = "
|
|
456
|
+
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
|
|
471
457
|
dependencies = [
|
|
472
458
|
"aho-corasick",
|
|
473
459
|
"memchr",
|
|
@@ -476,27 +462,30 @@ dependencies = [
|
|
|
476
462
|
|
|
477
463
|
[[package]]
|
|
478
464
|
name = "regex-syntax"
|
|
479
|
-
version = "0.8.
|
|
465
|
+
version = "0.8.10"
|
|
480
466
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
481
|
-
checksum = "
|
|
467
|
+
checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
|
|
482
468
|
|
|
483
469
|
[[package]]
|
|
484
470
|
name = "rustc-hash"
|
|
485
|
-
version = "
|
|
471
|
+
version = "2.1.2"
|
|
486
472
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
487
|
-
checksum = "
|
|
473
|
+
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
|
|
488
474
|
|
|
489
475
|
[[package]]
|
|
490
|
-
name = "
|
|
491
|
-
version = "
|
|
476
|
+
name = "rustc_version"
|
|
477
|
+
version = "0.4.1"
|
|
492
478
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
493
|
-
checksum = "
|
|
479
|
+
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
|
|
480
|
+
dependencies = [
|
|
481
|
+
"semver",
|
|
482
|
+
]
|
|
494
483
|
|
|
495
484
|
[[package]]
|
|
496
485
|
name = "selectors"
|
|
497
|
-
version = "0.
|
|
486
|
+
version = "0.37.0"
|
|
498
487
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
499
|
-
checksum = "
|
|
488
|
+
checksum = "2cfaaa6035167f0e604e42723c7650d59ee269ef220d7bbe0565602c8a0173b9"
|
|
500
489
|
dependencies = [
|
|
501
490
|
"bitflags",
|
|
502
491
|
"cssparser",
|
|
@@ -506,7 +495,7 @@ dependencies = [
|
|
|
506
495
|
"phf",
|
|
507
496
|
"phf_codegen",
|
|
508
497
|
"precomputed-hash",
|
|
509
|
-
"rustc-hash
|
|
498
|
+
"rustc-hash",
|
|
510
499
|
"servo_arc",
|
|
511
500
|
"smallvec",
|
|
512
501
|
]
|
|
@@ -522,26 +511,61 @@ dependencies = [
|
|
|
522
511
|
"rb-sys",
|
|
523
512
|
]
|
|
524
513
|
|
|
514
|
+
[[package]]
|
|
515
|
+
name = "semver"
|
|
516
|
+
version = "1.0.28"
|
|
517
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
518
|
+
checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
|
|
519
|
+
|
|
525
520
|
[[package]]
|
|
526
521
|
name = "seq-macro"
|
|
527
|
-
version = "0.3.
|
|
522
|
+
version = "0.3.6"
|
|
528
523
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
529
|
-
checksum = "
|
|
524
|
+
checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc"
|
|
525
|
+
|
|
526
|
+
[[package]]
|
|
527
|
+
name = "serde"
|
|
528
|
+
version = "1.0.228"
|
|
529
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
530
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
531
|
+
dependencies = [
|
|
532
|
+
"serde_core",
|
|
533
|
+
]
|
|
534
|
+
|
|
535
|
+
[[package]]
|
|
536
|
+
name = "serde_core"
|
|
537
|
+
version = "1.0.228"
|
|
538
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
539
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
540
|
+
dependencies = [
|
|
541
|
+
"serde_derive",
|
|
542
|
+
]
|
|
543
|
+
|
|
544
|
+
[[package]]
|
|
545
|
+
name = "serde_derive"
|
|
546
|
+
version = "1.0.228"
|
|
547
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
548
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
549
|
+
dependencies = [
|
|
550
|
+
"proc-macro2",
|
|
551
|
+
"quote",
|
|
552
|
+
"syn",
|
|
553
|
+
]
|
|
530
554
|
|
|
531
555
|
[[package]]
|
|
532
556
|
name = "servo_arc"
|
|
533
|
-
version = "0.4.
|
|
557
|
+
version = "0.4.3"
|
|
534
558
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
535
|
-
checksum = "
|
|
559
|
+
checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930"
|
|
536
560
|
dependencies = [
|
|
537
561
|
"stable_deref_trait",
|
|
538
562
|
]
|
|
539
563
|
|
|
540
564
|
[[package]]
|
|
541
565
|
name = "shell-words"
|
|
542
|
-
version = "1.1.
|
|
566
|
+
version = "1.1.1"
|
|
543
567
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
544
|
-
checksum = "
|
|
568
|
+
checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77"
|
|
545
569
|
|
|
546
570
|
[[package]]
|
|
547
571
|
name = "shlex"
|
|
@@ -551,27 +575,27 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
|
551
575
|
|
|
552
576
|
[[package]]
|
|
553
577
|
name = "siphasher"
|
|
554
|
-
version = "1.0.
|
|
578
|
+
version = "1.0.2"
|
|
555
579
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
556
|
-
checksum = "
|
|
580
|
+
checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"
|
|
557
581
|
|
|
558
582
|
[[package]]
|
|
559
583
|
name = "smallvec"
|
|
560
|
-
version = "1.
|
|
584
|
+
version = "1.15.1"
|
|
561
585
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
562
|
-
checksum = "
|
|
586
|
+
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
563
587
|
|
|
564
588
|
[[package]]
|
|
565
589
|
name = "stable_deref_trait"
|
|
566
|
-
version = "1.2.
|
|
590
|
+
version = "1.2.1"
|
|
567
591
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
568
|
-
checksum = "
|
|
592
|
+
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
|
569
593
|
|
|
570
594
|
[[package]]
|
|
571
595
|
name = "syn"
|
|
572
|
-
version = "2.0.
|
|
596
|
+
version = "2.0.117"
|
|
573
597
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
574
|
-
checksum = "
|
|
598
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
575
599
|
dependencies = [
|
|
576
600
|
"proc-macro2",
|
|
577
601
|
"quote",
|
|
@@ -580,18 +604,18 @@ dependencies = [
|
|
|
580
604
|
|
|
581
605
|
[[package]]
|
|
582
606
|
name = "thiserror"
|
|
583
|
-
version = "2.0.
|
|
607
|
+
version = "2.0.18"
|
|
584
608
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
585
|
-
checksum = "
|
|
609
|
+
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
|
|
586
610
|
dependencies = [
|
|
587
611
|
"thiserror-impl",
|
|
588
612
|
]
|
|
589
613
|
|
|
590
614
|
[[package]]
|
|
591
615
|
name = "thiserror-impl"
|
|
592
|
-
version = "2.0.
|
|
616
|
+
version = "2.0.18"
|
|
593
617
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
594
|
-
checksum = "
|
|
618
|
+
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
|
|
595
619
|
dependencies = [
|
|
596
620
|
"proc-macro2",
|
|
597
621
|
"quote",
|
|
@@ -600,70 +624,12 @@ dependencies = [
|
|
|
600
624
|
|
|
601
625
|
[[package]]
|
|
602
626
|
name = "unicode-ident"
|
|
603
|
-
version = "1.0.
|
|
627
|
+
version = "1.0.24"
|
|
604
628
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
605
|
-
checksum = "
|
|
629
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
606
630
|
|
|
607
631
|
[[package]]
|
|
608
|
-
name = "windows-
|
|
609
|
-
version = "0.
|
|
610
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
611
|
-
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
612
|
-
dependencies = [
|
|
613
|
-
"windows_aarch64_gnullvm",
|
|
614
|
-
"windows_aarch64_msvc",
|
|
615
|
-
"windows_i686_gnu",
|
|
616
|
-
"windows_i686_gnullvm",
|
|
617
|
-
"windows_i686_msvc",
|
|
618
|
-
"windows_x86_64_gnu",
|
|
619
|
-
"windows_x86_64_gnullvm",
|
|
620
|
-
"windows_x86_64_msvc",
|
|
621
|
-
]
|
|
622
|
-
|
|
623
|
-
[[package]]
|
|
624
|
-
name = "windows_aarch64_gnullvm"
|
|
625
|
-
version = "0.52.6"
|
|
626
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
627
|
-
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
628
|
-
|
|
629
|
-
[[package]]
|
|
630
|
-
name = "windows_aarch64_msvc"
|
|
631
|
-
version = "0.52.6"
|
|
632
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
633
|
-
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
634
|
-
|
|
635
|
-
[[package]]
|
|
636
|
-
name = "windows_i686_gnu"
|
|
637
|
-
version = "0.52.6"
|
|
638
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
639
|
-
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
640
|
-
|
|
641
|
-
[[package]]
|
|
642
|
-
name = "windows_i686_gnullvm"
|
|
643
|
-
version = "0.52.6"
|
|
644
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
645
|
-
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
646
|
-
|
|
647
|
-
[[package]]
|
|
648
|
-
name = "windows_i686_msvc"
|
|
649
|
-
version = "0.52.6"
|
|
650
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
651
|
-
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
652
|
-
|
|
653
|
-
[[package]]
|
|
654
|
-
name = "windows_x86_64_gnu"
|
|
655
|
-
version = "0.52.6"
|
|
656
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
657
|
-
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
658
|
-
|
|
659
|
-
[[package]]
|
|
660
|
-
name = "windows_x86_64_gnullvm"
|
|
661
|
-
version = "0.52.6"
|
|
662
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
663
|
-
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
664
|
-
|
|
665
|
-
[[package]]
|
|
666
|
-
name = "windows_x86_64_msvc"
|
|
667
|
-
version = "0.52.6"
|
|
632
|
+
name = "windows-link"
|
|
633
|
+
version = "0.2.1"
|
|
668
634
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
669
|
-
checksum = "
|
|
635
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
data/README.md
CHANGED
|
@@ -161,6 +161,7 @@ The `element` argument in `handle_element` has the following methods:
|
|
|
161
161
|
- `remove_attribute`: Remove an attribute
|
|
162
162
|
- `has_attribute?`: A bool which identifies whether or not the element has an attribute
|
|
163
163
|
- `attributes`: List all the attributes
|
|
164
|
+
- `attribute_source_location(name)`: Returns the byte ranges of an attribute's name and value within the original input as `{ name: Range, value: Range | nil }`, or `nil` if the attribute is missing or was added/modified during the rewrite. Pure boolean attributes written without `=` (e.g. `<input disabled>`) return `nil` because lol_html does not record their position.
|
|
164
165
|
- `ancestors`: List all of an element's ancestors as an array of strings
|
|
165
166
|
- `before(content, as: content_type)`: Inserts `content` before the element. `content_type` is either `:text` or `:html` and determines how the content will be applied.
|
|
166
167
|
- `after(content, as: content_type)`: Inserts `content` after the element. `content_type` is either `:text` or `:html` and determines how the content will be applied.
|