css-inline 0.20.1__tar.gz → 0.20.2__tar.gz

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.
Files changed (34) hide show
  1. {css_inline-0.20.1 → css_inline-0.20.2}/PKG-INFO +2 -2
  2. {css_inline-0.20.1/bindings/python → css_inline-0.20.2}/README.md +1 -1
  3. {css_inline-0.20.1 → css_inline-0.20.2}/bindings/python/CHANGELOG.md +8 -1
  4. {css_inline-0.20.1 → css_inline-0.20.2}/bindings/python/Cargo.lock +64 -73
  5. {css_inline-0.20.1 → css_inline-0.20.2}/bindings/python/Cargo.toml +1 -1
  6. {css_inline-0.20.1 → css_inline-0.20.2/bindings/python}/README.md +1 -1
  7. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/Cargo.toml +1 -1
  8. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/README.md +1 -1
  9. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/document.rs +3 -3
  10. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/lib.rs +12 -0
  11. {css_inline-0.20.1 → css_inline-0.20.2}/LICENSE +0 -0
  12. {css_inline-0.20.1 → css_inline-0.20.2}/bindings/python/build.rs +0 -0
  13. {css_inline-0.20.1 → css_inline-0.20.2}/bindings/python/src/lib.rs +0 -0
  14. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/benches/inliner.rs +0 -0
  15. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/rustfmt.toml +0 -0
  16. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/error.rs +0 -0
  17. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/attributes.rs +0 -0
  18. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/element.rs +0 -0
  19. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/iter.rs +0 -0
  20. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/mod.rs +0 -0
  21. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/node.rs +0 -0
  22. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/parser.rs +0 -0
  23. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/selectors/attr_value.rs +0 -0
  24. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/selectors/local_name.rs +0 -0
  25. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/selectors/mod.rs +0 -0
  26. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/selectors/parser.rs +0 -0
  27. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/selectors/pseudo_classes.rs +0 -0
  28. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/selectors/pseudo_elements.rs +0 -0
  29. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/selectors/selector_impl.rs +0 -0
  30. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/html/serializer.rs +0 -0
  31. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/main.rs +0 -0
  32. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/parser.rs +0 -0
  33. {css_inline-0.20.1 → css_inline-0.20.2}/css-inline/src/resolver.rs +0 -0
  34. {css_inline-0.20.1 → css_inline-0.20.2}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: css-inline
3
- Version: 0.20.1
3
+ Version: 0.20.2
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -118,7 +118,7 @@ inlined = css_inline.inline(HTML)
118
118
 
119
119
  Note that `css-inline` automatically adds missing `html` and `body` tags, so the output is a valid HTML document.
120
120
 
121
- Alternatively, you can inline CSS into an HTML fragment, preserving the original structure:
121
+ Alternatively, you can inline CSS into an HTML fragment. Structural tags (`<html>`, `<head>`, `<body>`) are stripped from the output; only their contents are preserved. Use `inline` if you need to keep the full document structure:
122
122
 
123
123
  ```python
124
124
  FRAGMENT = """<main>
@@ -90,7 +90,7 @@ inlined = css_inline.inline(HTML)
90
90
 
91
91
  Note that `css-inline` automatically adds missing `html` and `body` tags, so the output is a valid HTML document.
92
92
 
93
- Alternatively, you can inline CSS into an HTML fragment, preserving the original structure:
93
+ Alternatively, you can inline CSS into an HTML fragment. Structural tags (`<html>`, `<head>`, `<body>`) are stripped from the output; only their contents are preserved. Use `inline` if you need to keep the full document structure:
94
94
 
95
95
  ```python
96
96
  FRAGMENT = """<main>
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.20.2] - 2026-04-02
6
+
7
+ ### Fixed
8
+
9
+ - `inline_fragment` silently returning only whitespace when the input starts with whitespace or contains structural HTML tags (`<html>`, `<head>`, `<body>`, `<style>`). [#692](https://github.com/Stranger6667/css-inline/issues/692) [#693](https://github.com/Stranger6667/css-inline/issues/693)
10
+
5
11
  ## [0.20.1] - 2026-03-26
6
12
 
7
13
  ### Changed
@@ -563,7 +569,8 @@
563
569
 
564
570
  - Initial public release
565
571
 
566
- [Unreleased]: https://github.com/Stranger6667/css-inline/compare/python-v0.20.1...HEAD
572
+ [Unreleased]: https://github.com/Stranger6667/css-inline/compare/python-v0.20.2...HEAD
573
+ [0.20.2]: https://github.com/Stranger6667/css-inline/compare/python-v0.20.1...python-v0.20.2
567
574
  [0.20.1]: https://github.com/Stranger6667/css-inline/compare/python-v0.20.0...python-v0.20.1
568
575
  [0.20.0]: https://github.com/Stranger6667/css-inline/compare/python-v0.19.1...python-v0.20.0
569
576
  [0.19.1]: https://github.com/Stranger6667/css-inline/compare/python-v0.19.0...python-v0.19.1
@@ -77,9 +77,9 @@ dependencies = [
77
77
 
78
78
  [[package]]
79
79
  name = "cc"
80
- version = "1.2.57"
80
+ version = "1.2.58"
81
81
  source = "registry+https://github.com/rust-lang/crates.io-index"
82
- checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423"
82
+ checksum = "e1e928d4b69e3077709075a938a05ffbedfa53a84c8f766efbf8220bb1ff60e1"
83
83
  dependencies = [
84
84
  "find-msvc-tools",
85
85
  "shlex",
@@ -141,7 +141,7 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
141
141
 
142
142
  [[package]]
143
143
  name = "css-inline"
144
- version = "0.20.1"
144
+ version = "0.20.2"
145
145
  dependencies = [
146
146
  "cssparser",
147
147
  "html5ever",
@@ -157,7 +157,7 @@ dependencies = [
157
157
 
158
158
  [[package]]
159
159
  name = "css-inline-python"
160
- version = "0.20.1"
160
+ version = "0.20.2"
161
161
  dependencies = [
162
162
  "built",
163
163
  "css-inline",
@@ -420,9 +420,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
420
420
 
421
421
  [[package]]
422
422
  name = "hyper"
423
- version = "1.8.1"
423
+ version = "1.9.0"
424
424
  source = "registry+https://github.com/rust-lang/crates.io-index"
425
- checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11"
425
+ checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca"
426
426
  dependencies = [
427
427
  "atomic-waker",
428
428
  "bytes",
@@ -433,7 +433,6 @@ dependencies = [
433
433
  "httparse",
434
434
  "itoa",
435
435
  "pin-project-lite",
436
- "pin-utils",
437
436
  "smallvec",
438
437
  "tokio",
439
438
  "want",
@@ -623,9 +622,9 @@ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
623
622
 
624
623
  [[package]]
625
624
  name = "iri-string"
626
- version = "0.7.11"
625
+ version = "0.7.12"
627
626
  source = "registry+https://github.com/rust-lang/crates.io-index"
628
- checksum = "d8e7418f59cc01c88316161279a7f665217ae316b388e58a0d10e29f54f1e5eb"
627
+ checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20"
629
628
  dependencies = [
630
629
  "memchr",
631
630
  "serde",
@@ -639,25 +638,27 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
639
638
 
640
639
  [[package]]
641
640
  name = "js-sys"
642
- version = "0.3.91"
641
+ version = "0.3.94"
643
642
  source = "registry+https://github.com/rust-lang/crates.io-index"
644
- checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c"
643
+ checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9"
645
644
  dependencies = [
645
+ "cfg-if",
646
+ "futures-util",
646
647
  "once_cell",
647
648
  "wasm-bindgen",
648
649
  ]
649
650
 
650
651
  [[package]]
651
652
  name = "libc"
652
- version = "0.2.183"
653
+ version = "0.2.184"
653
654
  source = "registry+https://github.com/rust-lang/crates.io-index"
654
- checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
655
+ checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
655
656
 
656
657
  [[package]]
657
658
  name = "litemap"
658
- version = "0.8.1"
659
+ version = "0.8.2"
659
660
  source = "registry+https://github.com/rust-lang/crates.io-index"
660
- checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
661
+ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
661
662
 
662
663
  [[package]]
663
664
  name = "lock_api"
@@ -708,9 +709,9 @@ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
708
709
 
709
710
  [[package]]
710
711
  name = "mio"
711
- version = "1.1.1"
712
+ version = "1.2.0"
712
713
  source = "registry+https://github.com/rust-lang/crates.io-index"
713
- checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
714
+ checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
714
715
  dependencies = [
715
716
  "libc",
716
717
  "wasi",
@@ -826,12 +827,6 @@ version = "0.2.17"
826
827
  source = "registry+https://github.com/rust-lang/crates.io-index"
827
828
  checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
828
829
 
829
- [[package]]
830
- name = "pin-utils"
831
- version = "0.1.0"
832
- source = "registry+https://github.com/rust-lang/crates.io-index"
833
- checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
834
-
835
830
  [[package]]
836
831
  name = "portable-atomic"
837
832
  version = "1.13.1"
@@ -840,9 +835,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
840
835
 
841
836
  [[package]]
842
837
  name = "potential_utf"
843
- version = "0.1.4"
838
+ version = "0.1.5"
844
839
  source = "registry+https://github.com/rust-lang/crates.io-index"
845
- checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
840
+ checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"
846
841
  dependencies = [
847
842
  "zerovec",
848
843
  ]
@@ -873,9 +868,9 @@ dependencies = [
873
868
 
874
869
  [[package]]
875
870
  name = "pyo3"
876
- version = "0.28.2"
871
+ version = "0.28.3"
877
872
  source = "registry+https://github.com/rust-lang/crates.io-index"
878
- checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
873
+ checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
879
874
  dependencies = [
880
875
  "libc",
881
876
  "once_cell",
@@ -887,9 +882,9 @@ dependencies = [
887
882
 
888
883
  [[package]]
889
884
  name = "pyo3-build-config"
890
- version = "0.28.2"
885
+ version = "0.28.3"
891
886
  source = "registry+https://github.com/rust-lang/crates.io-index"
892
- checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
887
+ checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
893
888
  dependencies = [
894
889
  "target-lexicon",
895
890
  ]
@@ -902,9 +897,9 @@ checksum = "4bf83fcee540452241ba030140f50418b973e840a64727c967b9266660f0a690"
902
897
 
903
898
  [[package]]
904
899
  name = "pyo3-ffi"
905
- version = "0.28.2"
900
+ version = "0.28.3"
906
901
  source = "registry+https://github.com/rust-lang/crates.io-index"
907
- checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
902
+ checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
908
903
  dependencies = [
909
904
  "libc",
910
905
  "pyo3-build-config",
@@ -912,9 +907,9 @@ dependencies = [
912
907
 
913
908
  [[package]]
914
909
  name = "pyo3-macros"
915
- version = "0.28.2"
910
+ version = "0.28.3"
916
911
  source = "registry+https://github.com/rust-lang/crates.io-index"
917
- checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
912
+ checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
918
913
  dependencies = [
919
914
  "proc-macro2",
920
915
  "pyo3-macros-backend",
@@ -924,9 +919,9 @@ dependencies = [
924
919
 
925
920
  [[package]]
926
921
  name = "pyo3-macros-backend"
927
- version = "0.28.2"
922
+ version = "0.28.3"
928
923
  source = "registry+https://github.com/rust-lang/crates.io-index"
929
- checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
924
+ checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
930
925
  dependencies = [
931
926
  "heck",
932
927
  "proc-macro2",
@@ -1119,9 +1114,9 @@ dependencies = [
1119
1114
 
1120
1115
  [[package]]
1121
1116
  name = "rustc-hash"
1122
- version = "2.1.1"
1117
+ version = "2.1.2"
1123
1118
  source = "registry+https://github.com/rust-lang/crates.io-index"
1124
- checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
1119
+ checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
1125
1120
 
1126
1121
  [[package]]
1127
1122
  name = "rustc_version"
@@ -1426,9 +1421,9 @@ dependencies = [
1426
1421
 
1427
1422
  [[package]]
1428
1423
  name = "tinystr"
1429
- version = "0.8.2"
1424
+ version = "0.8.3"
1430
1425
  source = "registry+https://github.com/rust-lang/crates.io-index"
1431
- checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
1426
+ checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"
1432
1427
  dependencies = [
1433
1428
  "displaydoc",
1434
1429
  "zerovec",
@@ -1646,9 +1641,9 @@ dependencies = [
1646
1641
 
1647
1642
  [[package]]
1648
1643
  name = "wasm-bindgen"
1649
- version = "0.2.114"
1644
+ version = "0.2.117"
1650
1645
  source = "registry+https://github.com/rust-lang/crates.io-index"
1651
- checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e"
1646
+ checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0"
1652
1647
  dependencies = [
1653
1648
  "cfg-if",
1654
1649
  "once_cell",
@@ -1659,23 +1654,19 @@ dependencies = [
1659
1654
 
1660
1655
  [[package]]
1661
1656
  name = "wasm-bindgen-futures"
1662
- version = "0.4.64"
1657
+ version = "0.4.67"
1663
1658
  source = "registry+https://github.com/rust-lang/crates.io-index"
1664
- checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8"
1659
+ checksum = "03623de6905b7206edd0a75f69f747f134b7f0a2323392d664448bf2d3c5d87e"
1665
1660
  dependencies = [
1666
- "cfg-if",
1667
- "futures-util",
1668
1661
  "js-sys",
1669
- "once_cell",
1670
1662
  "wasm-bindgen",
1671
- "web-sys",
1672
1663
  ]
1673
1664
 
1674
1665
  [[package]]
1675
1666
  name = "wasm-bindgen-macro"
1676
- version = "0.2.114"
1667
+ version = "0.2.117"
1677
1668
  source = "registry+https://github.com/rust-lang/crates.io-index"
1678
- checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6"
1669
+ checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be"
1679
1670
  dependencies = [
1680
1671
  "quote",
1681
1672
  "wasm-bindgen-macro-support",
@@ -1683,9 +1674,9 @@ dependencies = [
1683
1674
 
1684
1675
  [[package]]
1685
1676
  name = "wasm-bindgen-macro-support"
1686
- version = "0.2.114"
1677
+ version = "0.2.117"
1687
1678
  source = "registry+https://github.com/rust-lang/crates.io-index"
1688
- checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3"
1679
+ checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2"
1689
1680
  dependencies = [
1690
1681
  "bumpalo",
1691
1682
  "proc-macro2",
@@ -1696,18 +1687,18 @@ dependencies = [
1696
1687
 
1697
1688
  [[package]]
1698
1689
  name = "wasm-bindgen-shared"
1699
- version = "0.2.114"
1690
+ version = "0.2.117"
1700
1691
  source = "registry+https://github.com/rust-lang/crates.io-index"
1701
- checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16"
1692
+ checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b"
1702
1693
  dependencies = [
1703
1694
  "unicode-ident",
1704
1695
  ]
1705
1696
 
1706
1697
  [[package]]
1707
1698
  name = "web-sys"
1708
- version = "0.3.91"
1699
+ version = "0.3.94"
1709
1700
  source = "registry+https://github.com/rust-lang/crates.io-index"
1710
- checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9"
1701
+ checksum = "cd70027e39b12f0849461e08ffc50b9cd7688d942c1c8e3c7b22273236b4dd0a"
1711
1702
  dependencies = [
1712
1703
  "js-sys",
1713
1704
  "wasm-bindgen",
@@ -1982,9 +1973,9 @@ checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
1982
1973
 
1983
1974
  [[package]]
1984
1975
  name = "yoke"
1985
- version = "0.8.1"
1976
+ version = "0.8.2"
1986
1977
  source = "registry+https://github.com/rust-lang/crates.io-index"
1987
- checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
1978
+ checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca"
1988
1979
  dependencies = [
1989
1980
  "stable_deref_trait",
1990
1981
  "yoke-derive",
@@ -1993,9 +1984,9 @@ dependencies = [
1993
1984
 
1994
1985
  [[package]]
1995
1986
  name = "yoke-derive"
1996
- version = "0.8.1"
1987
+ version = "0.8.2"
1997
1988
  source = "registry+https://github.com/rust-lang/crates.io-index"
1998
- checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
1989
+ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"
1999
1990
  dependencies = [
2000
1991
  "proc-macro2",
2001
1992
  "quote",
@@ -2005,18 +1996,18 @@ dependencies = [
2005
1996
 
2006
1997
  [[package]]
2007
1998
  name = "zerocopy"
2008
- version = "0.8.47"
1999
+ version = "0.8.48"
2009
2000
  source = "registry+https://github.com/rust-lang/crates.io-index"
2010
- checksum = "efbb2a062be311f2ba113ce66f697a4dc589f85e78a4aea276200804cea0ed87"
2001
+ checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
2011
2002
  dependencies = [
2012
2003
  "zerocopy-derive",
2013
2004
  ]
2014
2005
 
2015
2006
  [[package]]
2016
2007
  name = "zerocopy-derive"
2017
- version = "0.8.47"
2008
+ version = "0.8.48"
2018
2009
  source = "registry+https://github.com/rust-lang/crates.io-index"
2019
- checksum = "0e8bc7269b54418e7aeeef514aa68f8690b8c0489a06b0136e5f57c4c5ccab89"
2010
+ checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
2020
2011
  dependencies = [
2021
2012
  "proc-macro2",
2022
2013
  "quote",
@@ -2025,18 +2016,18 @@ dependencies = [
2025
2016
 
2026
2017
  [[package]]
2027
2018
  name = "zerofrom"
2028
- version = "0.1.6"
2019
+ version = "0.1.7"
2029
2020
  source = "registry+https://github.com/rust-lang/crates.io-index"
2030
- checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
2021
+ checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df"
2031
2022
  dependencies = [
2032
2023
  "zerofrom-derive",
2033
2024
  ]
2034
2025
 
2035
2026
  [[package]]
2036
2027
  name = "zerofrom-derive"
2037
- version = "0.1.6"
2028
+ version = "0.1.7"
2038
2029
  source = "registry+https://github.com/rust-lang/crates.io-index"
2039
- checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
2030
+ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"
2040
2031
  dependencies = [
2041
2032
  "proc-macro2",
2042
2033
  "quote",
@@ -2052,9 +2043,9 @@ checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
2052
2043
 
2053
2044
  [[package]]
2054
2045
  name = "zerotrie"
2055
- version = "0.2.3"
2046
+ version = "0.2.4"
2056
2047
  source = "registry+https://github.com/rust-lang/crates.io-index"
2057
- checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
2048
+ checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf"
2058
2049
  dependencies = [
2059
2050
  "displaydoc",
2060
2051
  "yoke",
@@ -2063,9 +2054,9 @@ dependencies = [
2063
2054
 
2064
2055
  [[package]]
2065
2056
  name = "zerovec"
2066
- version = "0.11.5"
2057
+ version = "0.11.6"
2067
2058
  source = "registry+https://github.com/rust-lang/crates.io-index"
2068
- checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
2059
+ checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239"
2069
2060
  dependencies = [
2070
2061
  "yoke",
2071
2062
  "zerofrom",
@@ -2074,9 +2065,9 @@ dependencies = [
2074
2065
 
2075
2066
  [[package]]
2076
2067
  name = "zerovec-derive"
2077
- version = "0.11.2"
2068
+ version = "0.11.3"
2078
2069
  source = "registry+https://github.com/rust-lang/crates.io-index"
2079
- checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
2070
+ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"
2080
2071
  dependencies = [
2081
2072
  "proc-macro2",
2082
2073
  "quote",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "css-inline-python"
3
- version = "0.20.1"
3
+ version = "0.20.2"
4
4
  authors = ["Dmitry Dygalo <dmitry@dygalo.dev>"]
5
5
  edition = "2024"
6
6
  rust-version = "1.85"
@@ -90,7 +90,7 @@ inlined = css_inline.inline(HTML)
90
90
 
91
91
  Note that `css-inline` automatically adds missing `html` and `body` tags, so the output is a valid HTML document.
92
92
 
93
- Alternatively, you can inline CSS into an HTML fragment, preserving the original structure:
93
+ Alternatively, you can inline CSS into an HTML fragment. Structural tags (`<html>`, `<head>`, `<body>`) are stripped from the output; only their contents are preserved. Use `inline` if you need to keep the full document structure:
94
94
 
95
95
  ```python
96
96
  FRAGMENT = """<main>
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "css-inline"
3
- version = "0.20.1"
3
+ version = "0.20.2"
4
4
  authors = ["Dmitry Dygalo <dmitry@dygalo.dev>"]
5
5
  edition = "2021"
6
6
  license = "MIT"
@@ -82,7 +82,7 @@ fn main() -> css_inline::Result<()> {
82
82
 
83
83
  Note that `css-inline` automatically adds missing `html` and `body` tags, so the output is a valid HTML document.
84
84
 
85
- Alternatively, you can inline CSS into an HTML fragment, preserving the original structure:
85
+ Alternatively, you can inline CSS into an HTML fragment. Structural tags (`<html>`, `<head>`, `<body>`) are stripped from the output; only their contents are preserved. Use `inline` if you need to keep the full document structure:
86
86
 
87
87
  ```rust
88
88
  const FRAGMENT: &str = r#"<main>
@@ -284,10 +284,10 @@ impl Document {
284
284
 
285
285
  /// Remove all the children from node and append them to `new_parent`.
286
286
  pub(super) fn reparent_children(&mut self, node: NodeId, new_parent: NodeId) {
287
- let mut next_child = self[node].first_child;
288
- while let Some(child) = next_child {
287
+ // Re-read `first_child` each iteration: `append` calls `detach` internally, which clears
288
+ // `child.next_sibling` and updates `node.first_child` to the former second child.
289
+ while let Some(child) = self[node].first_child {
289
290
  self.append(new_parent, child);
290
- next_child = self[child].next_sibling;
291
291
  }
292
292
  }
293
293
 
@@ -589,6 +589,14 @@ impl<'a> CSSInliner<'a> {
589
589
 
590
590
  /// Inline CSS into an HTML fragment.
591
591
  ///
592
+ /// Unlike [`inline`](CSSInliner::inline), this method does not wrap the output in `<html>` and
593
+ /// `<body>` tags. Structural tags (`<html>`, `<head>`, `<body>`) are stripped from the output;
594
+ /// only their contents are preserved. CSS from `<style>` tags within the input is also
595
+ /// processed and inlined.
596
+ ///
597
+ /// If you need to preserve the full HTML document structure, use [`inline`](CSSInliner::inline)
598
+ /// instead.
599
+ ///
592
600
  /// # Errors
593
601
  ///
594
602
  /// Inlining might fail for the following reasons:
@@ -609,6 +617,8 @@ impl<'a> CSSInliner<'a> {
609
617
 
610
618
  /// Inline CSS into an HTML fragment and write the result to a generic writer.
611
619
  ///
620
+ /// See [`inline_fragment`](CSSInliner::inline_fragment) for details on fragment handling.
621
+ ///
612
622
  /// # Errors
613
623
  ///
614
624
  /// Inlining might fail for the following reasons:
@@ -939,6 +949,8 @@ pub fn inline_to<W: Write>(html: &str, target: &mut W) -> Result<()> {
939
949
 
940
950
  /// Shortcut for inlining CSS into an HTML fragment with default parameters.
941
951
  ///
952
+ /// See [`CSSInliner::inline_fragment`] for details on fragment handling.
953
+ ///
942
954
  /// # Errors
943
955
  ///
944
956
  /// Inlining might fail for the following reasons:
File without changes
File without changes