Skip to main content

max / balanced_breakfast

bb-pdf: bump pulldown-cmark to 0.13 No source change. Rendered a real article to PDF under 0.12.2 and 0.13.4: extracted text is identical across all 353 lines, and the only byte difference is the creation timestamp. Workspace tests green, clippy clean. The lock now carries scraper twice, because bb-pdf reaches pter through the local path dep (scraper 0.27) while bb-core still uses the published pter 0.1.0 (scraper 0.26). Pre-existing pter duplication, noted not fixed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-22 18:27 UTC
Commit: 6a6212f224387b661586642c6322bf29c2968bae
Parent: 9638766
3 files changed, +66 insertions, -30 deletions
M Cargo.lock +65 -8
@@ -996,7 +996,7 @@ version = "0.27.2"
996 996 source = "registry+https://github.com/rust-lang/crates.io-index"
997 997 checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a"
998 998 dependencies = [
999 - "cssparser-macros",
999 + "cssparser-macros 0.6.1",
1000 1000 "dtoa-short",
1001 1001 "itoa 0.4.8",
1002 1002 "matches",
@@ -1013,7 +1013,7 @@ version = "0.29.6"
1013 1013 source = "registry+https://github.com/rust-lang/crates.io-index"
1014 1014 checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa"
1015 1015 dependencies = [
1016 - "cssparser-macros",
1016 + "cssparser-macros 0.6.1",
1017 1017 "dtoa-short",
1018 1018 "itoa 1.0.17",
1019 1019 "matches",
@@ -1030,7 +1030,7 @@ version = "0.35.0"
1030 1030 source = "registry+https://github.com/rust-lang/crates.io-index"
1031 1031 checksum = "4e901edd733a1472f944a45116df3f846f54d37e67e68640ac8bb69689aca2aa"
1032 1032 dependencies = [
1033 - "cssparser-macros",
1033 + "cssparser-macros 0.6.1",
1034 1034 "dtoa-short",
1035 1035 "itoa 1.0.17",
1036 1036 "phf 0.11.3",
@@ -1043,7 +1043,20 @@ version = "0.36.0"
1043 1043 source = "registry+https://github.com/rust-lang/crates.io-index"
1044 1044 checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2"
1045 1045 dependencies = [
1046 - "cssparser-macros",
1046 + "cssparser-macros 0.6.1",
1047 + "dtoa-short",
1048 + "itoa 1.0.17",
1049 + "phf 0.13.1",
1050 + "smallvec",
1051 + ]
1052 +
1053 + [[package]]
1054 + name = "cssparser"
1055 + version = "0.37.0"
1056 + source = "registry+https://github.com/rust-lang/crates.io-index"
1057 + checksum = "8c9cdaae01d5ed7882b04d795e7f752f46ff52d2fa3b50a20d28c464510bba98"
1058 + dependencies = [
1059 + "cssparser-macros 0.7.0",
1047 1060 "dtoa-short",
1048 1061 "itoa 1.0.17",
1049 1062 "phf 0.13.1",
@@ -1061,6 +1074,16 @@ dependencies = [
1061 1074 ]
1062 1075
1063 1076 [[package]]
1077 + name = "cssparser-macros"
1078 + version = "0.7.0"
1079 + source = "registry+https://github.com/rust-lang/crates.io-index"
1080 + checksum = "10a2a99df6e410a8ff4245aa2006499ea662245f967cc7c0a38c83ef8eb44dbf"
1081 + dependencies = [
1082 + "quote",
1083 + "syn 2.0.114",
1084 + ]
1085 +
1086 + [[package]]
1064 1087 name = "ctor"
1065 1088 version = "0.2.9"
1066 1089 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4130,21 +4153,21 @@ version = "0.1.0"
4130 4153 source = "registry+https://github.com/rust-lang/crates.io-index"
4131 4154 checksum = "ecc3629f628e0e8d975cd206ef331ce598dd457d94cd609c96a6809934732859"
4132 4155 dependencies = [
4133 - "scraper",
4156 + "scraper 0.26.0",
4134 4157 ]
4135 4158
4136 4159 [[package]]
4137 4160 name = "pter"
4138 4161 version = "0.1.1"
4139 4162 dependencies = [
4140 - "scraper",
4163 + "scraper 0.27.0",
4141 4164 ]
4142 4165
4143 4166 [[package]]
4144 4167 name = "pulldown-cmark"
4145 - version = "0.12.2"
4168 + version = "0.13.4"
4146 4169 source = "registry+https://github.com/rust-lang/crates.io-index"
4147 - checksum = "f86ba2052aebccc42cbbb3ed234b8b13ce76f75c3551a303cb2bcffcff12bb14"
4170 + checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e"
4148 4171 dependencies = [
4149 4172 "bitflags 2.13.1",
4150 4173 "getopts",
@@ -4738,6 +4761,21 @@ dependencies = [
4738 4761 ]
4739 4762
4740 4763 [[package]]
4764 + name = "scraper"
4765 + version = "0.27.0"
4766 + source = "registry+https://github.com/rust-lang/crates.io-index"
4767 + checksum = "bdd0be4d296f048bfb06dd01bbc80ef789ddd2e55583e8d2e6b804942abfabc2"
4768 + dependencies = [
4769 + "cssparser 0.37.0",
4770 + "ego-tree",
4771 + "getopts",
4772 + "html5ever 0.39.0",
4773 + "precomputed-hash",
4774 + "selectors 0.38.0",
4775 + "tendril 0.5.0",
4776 + ]
4777 +
4778 + [[package]]
4741 4779 name = "secret-service"
4742 4780 version = "5.1.0"
4743 4781 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4837,6 +4875,25 @@ dependencies = [
4837 4875 ]
4838 4876
4839 4877 [[package]]
4878 + name = "selectors"
4879 + version = "0.38.0"
4880 + source = "registry+https://github.com/rust-lang/crates.io-index"
4881 + checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d"
4882 + dependencies = [
4883 + "bitflags 2.13.1",
4884 + "cssparser 0.37.0",
4885 + "derive_more 2.1.1",
4886 + "log",
4887 + "new_debug_unreachable",
4888 + "phf 0.13.1",
4889 + "phf_codegen 0.13.1",
4890 + "precomputed-hash",
4891 + "rustc-hash",
4892 + "servo_arc 0.4.3",
4893 + "smallvec",
4894 + ]
4895 +
4896 + [[package]]
4840 4897 name = "semver"
4841 4898 version = "1.0.27"
4842 4899 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -7,6 +7,6 @@ description = "Render Balanced Breakfast article HTML to a Supernote-friendly PD
7 7
8 8 [dependencies]
9 9 pter = { path = "../../../../Libraries/pter" }
10 - pulldown-cmark = { version = "0.12", default-features = false }
10 + pulldown-cmark = { version = "0.13", default-features = false }
11 11 printpdf = { version = "0.7" }
12 12 thiserror = { workspace = true }
@@ -1,21 +0,0 @@
1 - //! Render an article HTML file to PDF on disk.
2 - //!
3 - //! cargo run --example render -- <input.html> <output.pdf> [title]
4 -
5 - use std::path::PathBuf;
6 -
7 - fn main() -> Result<(), Box<dyn std::error::Error>> {
8 - let mut args = std::env::args().skip(1);
9 - let input: PathBuf = args
10 - .next()
11 - .ok_or("usage: render <input.html> <output.pdf> [title]")?
12 - .into();
13 - let output: PathBuf = args.next().ok_or("missing <output.pdf>")?.into();
14 - let title = args.next().unwrap_or_else(|| "Article".to_string());
15 -
16 - let html = std::fs::read_to_string(&input)?;
17 - let bytes = bb_pdf::render_article(&html, &title, None)?;
18 - std::fs::write(&output, &bytes)?;
19 - println!("wrote {} bytes to {}", bytes.len(), output.display());
20 - Ok(())
21 - }