css_inline 0.16.0 → 0.17.0
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 +36 -26
- data/README.md +17 -2
- data/ext/css_inline/Cargo.lock +36 -26
- data/ext/css_inline/Cargo.toml +2 -2
- data/ext/css_inline/src/lib.rs +8 -5
- 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: 06e08f4bb917762d72e83081759790fadc9f9226d33d19473e031ee28bf38340
|
4
|
+
data.tar.gz: 00b5d9ab4eacfe837b11df8aa7cb083133ace0746491c247c1a9b573ecf1c811
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bad62adc1995b9e140b9fb2e8604c399ef2699b2ce9baa67da26b484672fd5f7b9b45e55e612b5ba41019a0b13a7d67c187569339d6691c9d69248888f098020
|
7
|
+
data.tar.gz: 31b579aa33316051d4e180b00297c404efbab38e6d1a0d8ffb4600306e292d9400424740dbbcd3c891bcb090c4077b75deb811ebadb8e12a536b128e7f927a5b
|
data/Cargo.lock
CHANGED
@@ -105,9 +105,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
|
105
105
|
|
106
106
|
[[package]]
|
107
107
|
name = "cc"
|
108
|
-
version = "1.2.
|
108
|
+
version = "1.2.30"
|
109
109
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
110
|
-
checksum = "
|
110
|
+
checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7"
|
111
111
|
dependencies = [
|
112
112
|
"shlex",
|
113
113
|
]
|
@@ -171,18 +171,18 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
171
171
|
|
172
172
|
[[package]]
|
173
173
|
name = "css-inline"
|
174
|
-
version = "0.
|
174
|
+
version = "0.17.0"
|
175
175
|
dependencies = [
|
176
|
-
"css-inline 0.
|
176
|
+
"css-inline 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
177
177
|
"magnus",
|
178
178
|
"rayon",
|
179
179
|
]
|
180
180
|
|
181
181
|
[[package]]
|
182
182
|
name = "css-inline"
|
183
|
-
version = "0.
|
183
|
+
version = "0.17.0"
|
184
184
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
185
|
-
checksum = "
|
185
|
+
checksum = "30983955a71311b6268dca9ea211b75136367ab3ed7d27d78617587d7d9beebf"
|
186
186
|
dependencies = [
|
187
187
|
"cssparser",
|
188
188
|
"html5ever",
|
@@ -506,9 +506,9 @@ dependencies = [
|
|
506
506
|
|
507
507
|
[[package]]
|
508
508
|
name = "hyper-util"
|
509
|
-
version = "0.1.
|
509
|
+
version = "0.1.16"
|
510
510
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
511
|
-
checksum = "
|
511
|
+
checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e"
|
512
512
|
dependencies = [
|
513
513
|
"base64",
|
514
514
|
"bytes",
|
@@ -522,7 +522,7 @@ dependencies = [
|
|
522
522
|
"libc",
|
523
523
|
"percent-encoding",
|
524
524
|
"pin-project-lite",
|
525
|
-
"socket2",
|
525
|
+
"socket2 0.6.0",
|
526
526
|
"tokio",
|
527
527
|
"tower-service",
|
528
528
|
"tracing",
|
@@ -647,9 +647,9 @@ dependencies = [
|
|
647
647
|
|
648
648
|
[[package]]
|
649
649
|
name = "io-uring"
|
650
|
-
version = "0.7.
|
650
|
+
version = "0.7.9"
|
651
651
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
652
|
-
checksum = "
|
652
|
+
checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4"
|
653
653
|
dependencies = [
|
654
654
|
"bitflags",
|
655
655
|
"cfg-if",
|
@@ -1015,7 +1015,7 @@ dependencies = [
|
|
1015
1015
|
"quinn-udp",
|
1016
1016
|
"rustc-hash 2.1.1",
|
1017
1017
|
"rustls",
|
1018
|
-
"socket2",
|
1018
|
+
"socket2 0.5.10",
|
1019
1019
|
"thiserror",
|
1020
1020
|
"tokio",
|
1021
1021
|
"tracing",
|
@@ -1031,7 +1031,7 @@ dependencies = [
|
|
1031
1031
|
"bytes",
|
1032
1032
|
"getrandom 0.3.3",
|
1033
1033
|
"lru-slab",
|
1034
|
-
"rand 0.9.
|
1034
|
+
"rand 0.9.2",
|
1035
1035
|
"ring",
|
1036
1036
|
"rustc-hash 2.1.1",
|
1037
1037
|
"rustls",
|
@@ -1052,7 +1052,7 @@ dependencies = [
|
|
1052
1052
|
"cfg_aliases",
|
1053
1053
|
"libc",
|
1054
1054
|
"once_cell",
|
1055
|
-
"socket2",
|
1055
|
+
"socket2 0.5.10",
|
1056
1056
|
"tracing",
|
1057
1057
|
"windows-sys 0.59.0",
|
1058
1058
|
]
|
@@ -1083,9 +1083,9 @@ dependencies = [
|
|
1083
1083
|
|
1084
1084
|
[[package]]
|
1085
1085
|
name = "rand"
|
1086
|
-
version = "0.9.
|
1086
|
+
version = "0.9.2"
|
1087
1087
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1088
|
-
checksum = "
|
1088
|
+
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
|
1089
1089
|
dependencies = [
|
1090
1090
|
"rand_chacha",
|
1091
1091
|
"rand_core 0.9.3",
|
@@ -1168,9 +1168,9 @@ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
|
|
1168
1168
|
|
1169
1169
|
[[package]]
|
1170
1170
|
name = "redox_syscall"
|
1171
|
-
version = "0.5.
|
1171
|
+
version = "0.5.16"
|
1172
1172
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1173
|
-
checksum = "
|
1173
|
+
checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792"
|
1174
1174
|
dependencies = [
|
1175
1175
|
"bitflags",
|
1176
1176
|
]
|
@@ -1376,9 +1376,9 @@ dependencies = [
|
|
1376
1376
|
|
1377
1377
|
[[package]]
|
1378
1378
|
name = "serde_json"
|
1379
|
-
version = "1.0.
|
1379
|
+
version = "1.0.141"
|
1380
1380
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1381
|
-
checksum = "
|
1381
|
+
checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3"
|
1382
1382
|
dependencies = [
|
1383
1383
|
"itoa",
|
1384
1384
|
"memchr",
|
@@ -1447,6 +1447,16 @@ dependencies = [
|
|
1447
1447
|
"windows-sys 0.52.0",
|
1448
1448
|
]
|
1449
1449
|
|
1450
|
+
[[package]]
|
1451
|
+
name = "socket2"
|
1452
|
+
version = "0.6.0"
|
1453
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1454
|
+
checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
|
1455
|
+
dependencies = [
|
1456
|
+
"libc",
|
1457
|
+
"windows-sys 0.59.0",
|
1458
|
+
]
|
1459
|
+
|
1450
1460
|
[[package]]
|
1451
1461
|
name = "stable_deref_trait"
|
1452
1462
|
version = "1.2.0"
|
@@ -1573,9 +1583,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
1573
1583
|
|
1574
1584
|
[[package]]
|
1575
1585
|
name = "tokio"
|
1576
|
-
version = "1.
|
1586
|
+
version = "1.47.0"
|
1577
1587
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1578
|
-
checksum = "
|
1588
|
+
checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35"
|
1579
1589
|
dependencies = [
|
1580
1590
|
"backtrace",
|
1581
1591
|
"bytes",
|
@@ -1584,8 +1594,8 @@ dependencies = [
|
|
1584
1594
|
"mio",
|
1585
1595
|
"pin-project-lite",
|
1586
1596
|
"slab",
|
1587
|
-
"socket2",
|
1588
|
-
"windows-sys 0.
|
1597
|
+
"socket2 0.6.0",
|
1598
|
+
"windows-sys 0.59.0",
|
1589
1599
|
]
|
1590
1600
|
|
1591
1601
|
[[package]]
|
@@ -1832,9 +1842,9 @@ dependencies = [
|
|
1832
1842
|
|
1833
1843
|
[[package]]
|
1834
1844
|
name = "webpki-roots"
|
1835
|
-
version = "1.0.
|
1845
|
+
version = "1.0.2"
|
1836
1846
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1837
|
-
checksum = "
|
1847
|
+
checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2"
|
1838
1848
|
dependencies = [
|
1839
1849
|
"rustls-pki-types",
|
1840
1850
|
]
|
data/README.md
CHANGED
@@ -135,6 +135,7 @@ inliner.inline("...")
|
|
135
135
|
- `inline_style_tags`. Specifies whether to inline CSS from "style" tags. Default: `true`
|
136
136
|
- `keep_style_tags`. Specifies whether to keep "style" tags after inlining. Default: `false`
|
137
137
|
- `keep_link_tags`. Specifies whether to keep "link" tags after inlining. Default: `false`
|
138
|
+
- `keep_at_rules`. Specifies whether to keep "at-rules" (starting with `@`) after inlining. Default: `false`
|
138
139
|
- `base_url`. The base URL used to resolve relative URLs. If you'd like to load stylesheets from your filesystem, use the `file://` scheme. Default: `nil`
|
139
140
|
- `load_remote_stylesheets`. Specifies whether remote stylesheets should be loaded. Default: `true`
|
140
141
|
- `cache`. Specifies caching options for external stylesheets (for example, `StylesheetCache(size: 5)`). Default: `nil`
|
@@ -166,7 +167,8 @@ The `data-css-inline="ignore"` attribute also allows you to skip `link` and `sty
|
|
166
167
|
```
|
167
168
|
|
168
169
|
Alternatively, you may keep `style` from being removed by using the `data-css-inline="keep"` attribute.
|
169
|
-
This is useful if you want to keep `@media` queries for responsive emails in separate `style` tags
|
170
|
+
This is useful if you want to keep `@media` queries for responsive emails in separate `style` tags.
|
171
|
+
Such tags will be kept in the resulting HTML even if the `keep_style_tags` option is set to `false`.
|
170
172
|
|
171
173
|
```html
|
172
174
|
<head>
|
@@ -178,7 +180,20 @@ This is useful if you want to keep `@media` queries for responsive emails in sep
|
|
178
180
|
</body>
|
179
181
|
```
|
180
182
|
|
181
|
-
|
183
|
+
Another possibility is to set `keep_at_rules` option to `true`. At-rules cannot be inlined into HTML therefore they
|
184
|
+
get removed by default. This is useful if you want to keep at-rules, e.g. `@media` queries for responsive emails in
|
185
|
+
separate `style` tags but inline any styles which can be inlined.
|
186
|
+
Such tags will be kept in the resulting HTML even if the `keep_style_tags` option is explicitly set to `false`.
|
187
|
+
|
188
|
+
```html
|
189
|
+
<head>
|
190
|
+
<!-- With keep_at_rules=true "color:blue" will get inlined into <h1> but @media will be kept in <style> -->
|
191
|
+
<style>h1 { color: blue; } @media (max-width: 600px) { h1 { font-size: 18px; } }</style>
|
192
|
+
</head>
|
193
|
+
<body>
|
194
|
+
<h1>Big Text</h1>
|
195
|
+
</body>
|
196
|
+
```
|
182
197
|
|
183
198
|
If you'd like to load stylesheets from your filesystem, use the `file://` scheme:
|
184
199
|
|
data/ext/css_inline/Cargo.lock
CHANGED
@@ -105,9 +105,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
|
105
105
|
|
106
106
|
[[package]]
|
107
107
|
name = "cc"
|
108
|
-
version = "1.2.
|
108
|
+
version = "1.2.30"
|
109
109
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
110
|
-
checksum = "
|
110
|
+
checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7"
|
111
111
|
dependencies = [
|
112
112
|
"shlex",
|
113
113
|
]
|
@@ -171,18 +171,18 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
171
171
|
|
172
172
|
[[package]]
|
173
173
|
name = "css-inline"
|
174
|
-
version = "0.
|
174
|
+
version = "0.17.0"
|
175
175
|
dependencies = [
|
176
|
-
"css-inline 0.
|
176
|
+
"css-inline 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
177
177
|
"magnus",
|
178
178
|
"rayon",
|
179
179
|
]
|
180
180
|
|
181
181
|
[[package]]
|
182
182
|
name = "css-inline"
|
183
|
-
version = "0.
|
183
|
+
version = "0.17.0"
|
184
184
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
185
|
-
checksum = "
|
185
|
+
checksum = "30983955a71311b6268dca9ea211b75136367ab3ed7d27d78617587d7d9beebf"
|
186
186
|
dependencies = [
|
187
187
|
"cssparser",
|
188
188
|
"html5ever",
|
@@ -506,9 +506,9 @@ dependencies = [
|
|
506
506
|
|
507
507
|
[[package]]
|
508
508
|
name = "hyper-util"
|
509
|
-
version = "0.1.
|
509
|
+
version = "0.1.16"
|
510
510
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
511
|
-
checksum = "
|
511
|
+
checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e"
|
512
512
|
dependencies = [
|
513
513
|
"base64",
|
514
514
|
"bytes",
|
@@ -522,7 +522,7 @@ dependencies = [
|
|
522
522
|
"libc",
|
523
523
|
"percent-encoding",
|
524
524
|
"pin-project-lite",
|
525
|
-
"socket2",
|
525
|
+
"socket2 0.6.0",
|
526
526
|
"tokio",
|
527
527
|
"tower-service",
|
528
528
|
"tracing",
|
@@ -647,9 +647,9 @@ dependencies = [
|
|
647
647
|
|
648
648
|
[[package]]
|
649
649
|
name = "io-uring"
|
650
|
-
version = "0.7.
|
650
|
+
version = "0.7.9"
|
651
651
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
652
|
-
checksum = "
|
652
|
+
checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4"
|
653
653
|
dependencies = [
|
654
654
|
"bitflags",
|
655
655
|
"cfg-if",
|
@@ -1015,7 +1015,7 @@ dependencies = [
|
|
1015
1015
|
"quinn-udp",
|
1016
1016
|
"rustc-hash 2.1.1",
|
1017
1017
|
"rustls",
|
1018
|
-
"socket2",
|
1018
|
+
"socket2 0.5.10",
|
1019
1019
|
"thiserror",
|
1020
1020
|
"tokio",
|
1021
1021
|
"tracing",
|
@@ -1031,7 +1031,7 @@ dependencies = [
|
|
1031
1031
|
"bytes",
|
1032
1032
|
"getrandom 0.3.3",
|
1033
1033
|
"lru-slab",
|
1034
|
-
"rand 0.9.
|
1034
|
+
"rand 0.9.2",
|
1035
1035
|
"ring",
|
1036
1036
|
"rustc-hash 2.1.1",
|
1037
1037
|
"rustls",
|
@@ -1052,7 +1052,7 @@ dependencies = [
|
|
1052
1052
|
"cfg_aliases",
|
1053
1053
|
"libc",
|
1054
1054
|
"once_cell",
|
1055
|
-
"socket2",
|
1055
|
+
"socket2 0.5.10",
|
1056
1056
|
"tracing",
|
1057
1057
|
"windows-sys 0.59.0",
|
1058
1058
|
]
|
@@ -1083,9 +1083,9 @@ dependencies = [
|
|
1083
1083
|
|
1084
1084
|
[[package]]
|
1085
1085
|
name = "rand"
|
1086
|
-
version = "0.9.
|
1086
|
+
version = "0.9.2"
|
1087
1087
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1088
|
-
checksum = "
|
1088
|
+
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
|
1089
1089
|
dependencies = [
|
1090
1090
|
"rand_chacha",
|
1091
1091
|
"rand_core 0.9.3",
|
@@ -1168,9 +1168,9 @@ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
|
|
1168
1168
|
|
1169
1169
|
[[package]]
|
1170
1170
|
name = "redox_syscall"
|
1171
|
-
version = "0.5.
|
1171
|
+
version = "0.5.16"
|
1172
1172
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1173
|
-
checksum = "
|
1173
|
+
checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792"
|
1174
1174
|
dependencies = [
|
1175
1175
|
"bitflags",
|
1176
1176
|
]
|
@@ -1376,9 +1376,9 @@ dependencies = [
|
|
1376
1376
|
|
1377
1377
|
[[package]]
|
1378
1378
|
name = "serde_json"
|
1379
|
-
version = "1.0.
|
1379
|
+
version = "1.0.141"
|
1380
1380
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1381
|
-
checksum = "
|
1381
|
+
checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3"
|
1382
1382
|
dependencies = [
|
1383
1383
|
"itoa",
|
1384
1384
|
"memchr",
|
@@ -1447,6 +1447,16 @@ dependencies = [
|
|
1447
1447
|
"windows-sys 0.52.0",
|
1448
1448
|
]
|
1449
1449
|
|
1450
|
+
[[package]]
|
1451
|
+
name = "socket2"
|
1452
|
+
version = "0.6.0"
|
1453
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1454
|
+
checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
|
1455
|
+
dependencies = [
|
1456
|
+
"libc",
|
1457
|
+
"windows-sys 0.59.0",
|
1458
|
+
]
|
1459
|
+
|
1450
1460
|
[[package]]
|
1451
1461
|
name = "stable_deref_trait"
|
1452
1462
|
version = "1.2.0"
|
@@ -1573,9 +1583,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
1573
1583
|
|
1574
1584
|
[[package]]
|
1575
1585
|
name = "tokio"
|
1576
|
-
version = "1.
|
1586
|
+
version = "1.47.0"
|
1577
1587
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1578
|
-
checksum = "
|
1588
|
+
checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35"
|
1579
1589
|
dependencies = [
|
1580
1590
|
"backtrace",
|
1581
1591
|
"bytes",
|
@@ -1584,8 +1594,8 @@ dependencies = [
|
|
1584
1594
|
"mio",
|
1585
1595
|
"pin-project-lite",
|
1586
1596
|
"slab",
|
1587
|
-
"socket2",
|
1588
|
-
"windows-sys 0.
|
1597
|
+
"socket2 0.6.0",
|
1598
|
+
"windows-sys 0.59.0",
|
1589
1599
|
]
|
1590
1600
|
|
1591
1601
|
[[package]]
|
@@ -1832,9 +1842,9 @@ dependencies = [
|
|
1832
1842
|
|
1833
1843
|
[[package]]
|
1834
1844
|
name = "webpki-roots"
|
1835
|
-
version = "1.0.
|
1845
|
+
version = "1.0.2"
|
1836
1846
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1837
|
-
checksum = "
|
1847
|
+
checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2"
|
1838
1848
|
dependencies = [
|
1839
1849
|
"rustls-pki-types",
|
1840
1850
|
]
|
data/ext/css_inline/Cargo.toml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[package]
|
2
2
|
name = "css-inline"
|
3
|
-
version = "0.
|
3
|
+
version = "0.17.0"
|
4
4
|
authors = ["Dmitry Dygalo <dmitry@dygalo.dev>"]
|
5
5
|
edition = "2021"
|
6
6
|
readme = "README.rdoc"
|
@@ -20,6 +20,6 @@ magnus = "0.7"
|
|
20
20
|
rayon = "1"
|
21
21
|
|
22
22
|
[dependencies.css-inline]
|
23
|
-
version = "0.
|
23
|
+
version = "0.17"
|
24
24
|
default-features = false
|
25
25
|
features = ["http", "file", "stylesheet-cache"]
|
data/ext/css_inline/src/lib.rs
CHANGED
@@ -52,6 +52,7 @@ fn parse_options<Req>(
|
|
52
52
|
Option<bool>,
|
53
53
|
Option<bool>,
|
54
54
|
Option<bool>,
|
55
|
+
Option<bool>,
|
55
56
|
Option<String>,
|
56
57
|
Option<bool>,
|
57
58
|
Option<Obj<StylesheetCache>>,
|
@@ -66,6 +67,7 @@ fn parse_options<Req>(
|
|
66
67
|
"inline_style_tags",
|
67
68
|
"keep_style_tags",
|
68
69
|
"keep_link_tags",
|
70
|
+
"keep_at_rules",
|
69
71
|
"base_url",
|
70
72
|
"load_remote_stylesheets",
|
71
73
|
"cache",
|
@@ -78,13 +80,14 @@ fn parse_options<Req>(
|
|
78
80
|
inline_style_tags: kwargs.0.unwrap_or(true),
|
79
81
|
keep_style_tags: kwargs.1.unwrap_or(false),
|
80
82
|
keep_link_tags: kwargs.2.unwrap_or(false),
|
81
|
-
|
82
|
-
|
83
|
+
keep_at_rules: kwargs.3.unwrap_or(false),
|
84
|
+
base_url: parse_url(kwargs.4)?,
|
85
|
+
load_remote_stylesheets: kwargs.5.unwrap_or(true),
|
83
86
|
cache: kwargs
|
84
|
-
.
|
87
|
+
.6
|
85
88
|
.map(|cache| Mutex::new(rust_inline::StylesheetCache::new(cache.size))),
|
86
|
-
extra_css: kwargs.
|
87
|
-
preallocate_node_capacity: kwargs.
|
89
|
+
extra_css: kwargs.7.map(Cow::Owned),
|
90
|
+
preallocate_node_capacity: kwargs.8.unwrap_or(32),
|
88
91
|
resolver: Arc::new(rust_inline::DefaultStylesheetResolver),
|
89
92
|
})
|
90
93
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css_inline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Dygalo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb_sys
|