selma 0.4.2 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f3bbf7895a04619bbf8f4c4a703b4d84d9621eef2e492dbca69ddec287b51bf
4
- data.tar.gz: 78f4a3afa4b340f1261c8d4ed99089ff916dba2d4c1dbde250b1be111d69e6c7
3
+ metadata.gz: 74ac7348cf564006d365a2d422b4966bbb7f9f2170fc72971945112f75fce9ee
4
+ data.tar.gz: ff4872ca7d0a50c8a153947e3682a5cab10f5969c42dc8aa546d11c05efebb40
5
5
  SHA512:
6
- metadata.gz: 825e71b47e7cc393ed592a62bca3c2d9147ca0c6ecb234cde9c7a6593e63eb10692811b3ea8460a2426878a6fc4f70646187e80bdf9f5fc4331ae2187da2a032
7
- data.tar.gz: 02c81c3b84a49ac65a93dcc3c16d3950ad20034820e8f551d42149938bbb85e20793e7156576026c54e2fec7571382403f6b23e6910a32f0b9a3327c3e4615cf
6
+ metadata.gz: e3c92857028c55138b6d5a95e23f68815448a3cf1324920350eb864971002e4c1033508d61f28aa53df5174b7e14c2875714773249437e6c20e29c478c49956b
7
+ data.tar.gz: 0de6e5cbb614e1cd1de5bf2e111a27a646673dc3c046b29048a8e99bce79a45198a30598e46d0b8e977e19faff80ebc110e05b91b39d2f4f662a2fc0f478ce35
data/Cargo.lock CHANGED
@@ -40,7 +40,7 @@ dependencies = [
40
40
  "regex",
41
41
  "rustc-hash",
42
42
  "shlex",
43
- "syn 2.0.71",
43
+ "syn 2.0.72",
44
44
  ]
45
45
 
46
46
  [[package]]
@@ -117,7 +117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
117
117
  checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
118
118
  dependencies = [
119
119
  "quote",
120
- "syn 2.0.71",
120
+ "syn 2.0.72",
121
121
  ]
122
122
 
123
123
  [[package]]
@@ -130,7 +130,7 @@ dependencies = [
130
130
  "proc-macro2",
131
131
  "quote",
132
132
  "rustc_version",
133
- "syn 2.0.71",
133
+ "syn 2.0.72",
134
134
  ]
135
135
 
136
136
  [[package]]
@@ -186,7 +186,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b"
186
186
  dependencies = [
187
187
  "proc-macro2",
188
188
  "quote",
189
- "syn 2.0.71",
189
+ "syn 2.0.72",
190
190
  ]
191
191
 
192
192
  [[package]]
@@ -268,9 +268,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
268
268
 
269
269
  [[package]]
270
270
  name = "libloading"
271
- version = "0.8.4"
271
+ version = "0.8.5"
272
272
  source = "registry+https://github.com/rust-lang/crates.io-index"
273
- checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d"
273
+ checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
274
274
  dependencies = [
275
275
  "cfg-if",
276
276
  "windows-targets",
@@ -321,7 +321,7 @@ checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3"
321
321
  dependencies = [
322
322
  "proc-macro2",
323
323
  "quote",
324
- "syn 2.0.71",
324
+ "syn 2.0.72",
325
325
  ]
326
326
 
327
327
  [[package]]
@@ -513,18 +513,18 @@ dependencies = [
513
513
 
514
514
  [[package]]
515
515
  name = "rb-sys"
516
- version = "0.9.98"
516
+ version = "0.9.99"
517
517
  source = "registry+https://github.com/rust-lang/crates.io-index"
518
- checksum = "8914b2e6af10bd50dd7aaac8c5146872d3924d6012929b4ff504e988f6badd24"
518
+ checksum = "d83151cfea2b67db2444f68c53b119ff77cff235ad711c765072e4daf8f3185b"
519
519
  dependencies = [
520
520
  "rb-sys-build",
521
521
  ]
522
522
 
523
523
  [[package]]
524
524
  name = "rb-sys-build"
525
- version = "0.9.98"
525
+ version = "0.9.99"
526
526
  source = "registry+https://github.com/rust-lang/crates.io-index"
527
- checksum = "12af68c9757d419b82d65a12b5db538990dfe9416049fea3f0ba4b9a8ca108cd"
527
+ checksum = "32d038214c118ad4a75db555ccb78672e17e1c5c10f344456cd129008dbaa7de"
528
528
  dependencies = [
529
529
  "bindgen",
530
530
  "lazy_static",
@@ -532,7 +532,7 @@ dependencies = [
532
532
  "quote",
533
533
  "regex",
534
534
  "shell-words",
535
- "syn 2.0.71",
535
+ "syn 2.0.72",
536
536
  ]
537
537
 
538
538
  [[package]]
@@ -681,9 +681,9 @@ dependencies = [
681
681
 
682
682
  [[package]]
683
683
  name = "syn"
684
- version = "2.0.71"
684
+ version = "2.0.72"
685
685
  source = "registry+https://github.com/rust-lang/crates.io-index"
686
- checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462"
686
+ checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af"
687
687
  dependencies = [
688
688
  "proc-macro2",
689
689
  "quote",
@@ -698,22 +698,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
698
698
 
699
699
  [[package]]
700
700
  name = "thiserror"
701
- version = "1.0.62"
701
+ version = "1.0.63"
702
702
  source = "registry+https://github.com/rust-lang/crates.io-index"
703
- checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb"
703
+ checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
704
704
  dependencies = [
705
705
  "thiserror-impl",
706
706
  ]
707
707
 
708
708
  [[package]]
709
709
  name = "thiserror-impl"
710
- version = "1.0.62"
710
+ version = "1.0.63"
711
711
  source = "registry+https://github.com/rust-lang/crates.io-index"
712
- checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c"
712
+ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
713
713
  dependencies = [
714
714
  "proc-macro2",
715
715
  "quote",
716
- "syn 2.0.71",
716
+ "syn 2.0.72",
717
717
  ]
718
718
 
719
719
  [[package]]
@@ -724,9 +724,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
724
724
 
725
725
  [[package]]
726
726
  name = "version_check"
727
- version = "0.9.4"
727
+ version = "0.9.5"
728
728
  source = "registry+https://github.com/rust-lang/crates.io-index"
729
- checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
729
+ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
730
730
 
731
731
  [[package]]
732
732
  name = "wasi"
@@ -815,5 +815,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
815
815
  dependencies = [
816
816
  "proc-macro2",
817
817
  "quote",
818
- "syn 2.0.71",
818
+ "syn 2.0.72",
819
819
  ]
@@ -442,13 +442,12 @@ impl SelmaRewriter {
442
442
 
443
443
  let closure_element_stack = element_stack.clone();
444
444
 
445
- el.end_tag_handlers()
446
- .unwrap()
447
- .push(Box::new(move |_end_tag| {
448
- let mut stack = closure_element_stack.as_ref().borrow_mut();
449
- stack.pop();
445
+ if let Some(end_tag_handlers) = el.end_tag_handlers() {
446
+ end_tag_handlers.push(Box::new(move |_end_tag| {
447
+ closure_element_stack.as_ref().borrow_mut().pop();
450
448
  Ok(())
451
449
  }));
450
+ }
452
451
 
453
452
  Ok(())
454
453
  }));
@@ -516,6 +515,10 @@ impl SelmaRewriter {
516
515
  }));
517
516
  }
518
517
 
518
+ if element.removed() {
519
+ return Ok(());
520
+ }
521
+
519
522
  let rb_element = SelmaHTMLElement::new(element, ancestors);
520
523
  let rb_result =
521
524
  rb_handler.funcall::<_, _, Value>(Self::SELMA_HANDLE_ELEMENT, (rb_element,));
data/lib/selma/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Selma
4
- VERSION = "0.4.2"
4
+ VERSION = "0.4.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-16 00:00:00.000000000 Z
11
+ date: 2024-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys