carve-lang 0.1.7 → 0.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1129dd70ab09658be69bfbbf0158a02d599d9e814fb5e3f015be6d1a6cc5621
4
- data.tar.gz: bc87753903ba603238e2c766b20c8384259dc8f44e87da90af4ef3f6d26ac613
3
+ metadata.gz: 701231311b5228a33a5ca37b7855209d3521f8ece697824f0b3e3322cb69a30a
4
+ data.tar.gz: 869fc6cbce2b49755f7c9e734afd1ec1afc860f508cec75f4e8f3b13b7ed91db
5
5
  SHA512:
6
- metadata.gz: f4f5180ccfda64b312e035b7302db7de20b52293466dd1719715d7ab9fcdfa06ba61b23e993d042df746ced604219bdb78cd5931e09a6dd25388ee9fffcac102
7
- data.tar.gz: c1276c1504398c7be637fc9e6699b42217e0a3845f49e7647348650701abdc25148fe2138c49643171154d8834c184ef711b294bd3f3215db29de509299e127c
6
+ metadata.gz: c46d50c7fe1dde855c0d4959067b8d99c45a905610c156a68d40ebf1f5b241d8fc036754755309c8a58d54d41e85c0bd3418031eed1fd393f3dfb6e9b5226ee1
7
+ data.tar.gz: 23f7732176af5392bd32839ddffc77e565ed0a9d3a68677f9206d19c71db796922301fcc6231f028dc7bf3ca250ccab54912d879ed8b3c2305eff18123cd7e17
data/CHANGELOG.md CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.8] - 2026-10-14
11
+
12
+ ### Breaking
13
+
14
+ - The engine is the published `carve-lang` 0.1.9 crate, so the AST follows contract 1.1: a cell joined across lines holds a `cell_wrap` node between its text halves, tables carry `separatorWidths`, and `delim` and `bulletChar` appear only for `)` and `*` (#200, markup-carve/carve-rs#2482).
15
+ - New loss codes such as `carrier-attribute-dropped`, `list-style-dropped` and `frontmatter-synthesized`. A check that fails on unknown codes has to list them (#200, markup-carve/carve-rs#2523).
16
+ - Image alt text and quoted include paths decode punctuation escapes, so double a literal backslash. The include rename warning's rule id is now `include-id-rename` instead of `include-heading-id-rename` (#184, markup-carve/carve#2772).
17
+
18
+ ### Fixes
19
+
20
+ - A Markdown writer refusal raises `ArgumentError` instead of panicking in the engine (#184).
21
+ - Adjacent alphabetic and Roman ordered lists stay separate through HTML import and formatting (#185).
22
+ - Under the article profile, denied raw blocks become code blocks that keep their payload (#185).
23
+
24
+ ### Improvements
25
+
26
+ - Markdown import reports assess construct fidelity, including preserved constructs as well as losses (#185).
27
+ - Ordered lists keep a `)` delimiter as `data-delim` in HTML and through Markdown import (#185).
28
+
10
29
  ## [0.1.7] - 2026-10-07
11
30
 
12
31
  ### Changed
@@ -444,7 +463,8 @@ are not listed, because no release ever shipped them.
444
463
  Arrays (every AST node type is covered), enabling custom renderers such as
445
464
  [carve-hexapdf](https://github.com/markup-carve/carve-hexapdf).
446
465
 
447
- [Unreleased]: https://github.com/markup-carve/carve-rb/compare/v0.1.7...HEAD
466
+ [Unreleased]: https://github.com/markup-carve/carve-rb/compare/v0.1.8...HEAD
467
+ [0.1.8]: https://github.com/markup-carve/carve-rb/compare/v0.1.7...v0.1.8
448
468
  [0.1.7]: https://github.com/markup-carve/carve-rb/compare/v0.1.6...v0.1.7
449
469
  [0.1.6]: https://github.com/markup-carve/carve-rb/compare/v0.1.5...v0.1.6
450
470
  [0.1.5]: https://github.com/markup-carve/carve-rb/compare/v0.1.4...v0.1.5
data/ext/carve/Cargo.lock CHANGED
@@ -37,9 +37,9 @@ checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
37
37
 
38
38
  [[package]]
39
39
  name = "carve-lang"
40
- version = "0.1.8"
40
+ version = "0.1.9"
41
41
  source = "registry+https://github.com/rust-lang/crates.io-index"
42
- checksum = "0889683244be278df2ff8e1cd88e9f932036a424bb8d838546636b7f11e93903"
42
+ checksum = "8747e096cacdd7097d884ffb9dd15dc70dd7e636081a31335bb786313924f341"
43
43
  dependencies = [
44
44
  "html5ever",
45
45
  "markup5ever_rcdom",
@@ -54,7 +54,7 @@ dependencies = [
54
54
 
55
55
  [[package]]
56
56
  name = "carve-rb"
57
- version = "0.1.7"
57
+ version = "0.1.8"
58
58
  dependencies = [
59
59
  "carve-lang",
60
60
  "magnus",
@@ -327,9 +327,16 @@ checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e"
327
327
  dependencies = [
328
328
  "bitflags",
329
329
  "memchr",
330
+ "pulldown-cmark-escape",
330
331
  "unicase",
331
332
  ]
332
333
 
334
+ [[package]]
335
+ name = "pulldown-cmark-escape"
336
+ version = "0.11.0"
337
+ source = "registry+https://github.com/rust-lang/crates.io-index"
338
+ checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae"
339
+
333
340
  [[package]]
334
341
  name = "quote"
335
342
  version = "1.0.46"
data/ext/carve/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "carve-rb"
3
- version = "0.1.7"
3
+ version = "0.1.8"
4
4
  edition = "2021"
5
5
  rust-version = "1.75"
6
6
  publish = false
@@ -22,4 +22,4 @@ serde_json = "1"
22
22
  # The Carve engine. Imported under the Rust crate alias `carve_rs` so the
23
23
  # binding's own crate name (`carve-rb`) does not collide with the engine's
24
24
  # package name (`carve`) in the Cargo lockfile.
25
- carve_rs = { package = "carve-lang", version = "=0.1.8" }
25
+ carve_rs = { package = "carve-lang", version = "=0.1.9" }
data/ext/carve/src/lib.rs CHANGED
@@ -471,15 +471,20 @@ fn from_html_json(ruby: &Ruby, source: String, mode: String) -> Result<String, E
471
471
  .to_string())
472
472
  }
473
473
 
474
- fn from_markdown_json(source: String) -> String {
475
- let result = carve_rs::migrate_markdown(&source);
474
+ fn from_markdown_json(ruby: &Ruby, source: String) -> Result<String, Error> {
475
+ let result = carve_rs::try_migrate_markdown(&source).map_err(|error| {
476
+ Error::new(
477
+ ruby.exception_arg_error(),
478
+ format!("Markdown import failed: {error}"),
479
+ )
480
+ })?;
476
481
  let diagnostics = result
477
482
  .report
478
483
  .diagnostics
479
484
  .iter()
480
485
  .map(migration_diagnostic_json)
481
486
  .collect::<Vec<_>>();
482
- serde_json::json!({"value": result.value, "report": {"schemaVersion": result.report.schema_version, "sourceFormat": result.report.source_format.as_str(), "diagnostics": diagnostics}}).to_string()
487
+ Ok(serde_json::json!({"value": result.value, "report": {"schemaVersion": result.report.schema_version, "sourceFormat": result.report.source_format.as_str(), "diagnostics": diagnostics}}).to_string())
483
488
  }
484
489
 
485
490
  fn migration_diagnostic_json(diagnostic: &carve_rs::MigrationDiagnostic) -> serde_json::Value {
@@ -853,7 +858,7 @@ guarded!(g_to_markdown(source: String) -> String => to_markdown);
853
858
  guarded!(g_to_plain_text(source: String) -> String => to_plain_text);
854
859
  guarded!(g_to_ansi(source: String) -> String => to_ansi);
855
860
  guarded!(g_to_carve(source: String) -> String => to_carve);
856
- guarded!(g_from_markdown_json(source: String) -> String => from_markdown_json);
861
+ guarded!(g_from_markdown_json(ruby: &Ruby, source: String) -> String =>? from_markdown_json);
857
862
  guarded!(g_to_ast_json(source: String) -> String => to_ast_json);
858
863
  guarded!(g_extension_names() -> Vec<String> => extension_names);
859
864
  guarded!(g_panic_probe() -> String => panic_probe);
data/lib/carve/version.rb CHANGED
@@ -8,5 +8,5 @@ module Carve
8
8
  # compares it against ext/carve/Cargo.toml and against the newest cut
9
9
  # CHANGELOG section on every run, and .github/workflows/release.yml refuses to
10
10
  # publish a gem whose version is not the tag being released.
11
- VERSION = "0.1.7"
11
+ VERSION = "0.1.8"
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carve-lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - markup-carve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-07 00:00:00.000000000 Z
11
+ date: 2026-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys