carve-hexapdf 0.1.3 → 0.1.4

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: 20e7254d5697ad9d0e7b04769f516ce56b892d09c5407fe6b6cbd3e1ed8eed7e
4
- data.tar.gz: 24af38395418395895e2eb639d8f6dd1e8ce3827135e532338fd670df2b8befb
3
+ metadata.gz: 9ca1e064f1b2cfe5886e3c9ead5c523e39d8017f560fa045c01e18af746ebdcc
4
+ data.tar.gz: 7a5055cb52def857760862d08a68aa112623a698760169e85a23358f6f04d548
5
5
  SHA512:
6
- metadata.gz: 813e1c949beb5f2047b406fa06bc1580da7e5e163d6f67b95e15ca17d06fbc037585b8435f49e60c14cfba117f74d17d5184deeb5be7f6b023071759fd2b48eb
7
- data.tar.gz: 7616495f87f40f73f2edbb423fea6c7d43b9443f930cb8372542225c682383913455879045f5ed7e5fc25bf0317e4a7976f77b8c39afe9ba4e9422c937f7703d
6
+ metadata.gz: 3f24bf3e136eb703f0a3561b8f929f6ede44f372b2722fdf19560669420df44ada47ead8f14e3b2f3d858681c4ab0a5488c4723e44c9598e620c9920ab63bd68
7
+ data.tar.gz: 5db634aa0f278239009b35018bc524a27295f1494c92be78f577f955d1af139086e06190207bc68f7fe4906650c52d3853fa5444f0a56b44308ec1fa07fd9e49
data/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.4] - 2026-10-23
11
+
12
+ ### Fixed
13
+
14
+ - A table continuation row (`+ x |`) joins its cell with one space, as the spec
15
+ renders it; the two halves used to run together (`1x`) (#54).
16
+ - A CriticMarkup substitution reaches the page on carve-lang 0.1.3 and older,
17
+ which publish its halves as `oldText`/`newText` strings; both halves used to
18
+ be dropped (#55).
19
+
10
20
  ## [0.1.3] - 2026-10-08
11
21
 
12
22
  ### Fixed
@@ -514,6 +514,8 @@ module Carve
514
514
  case node[:type]
515
515
  when "text" then out << run(node[:value].to_s, ctx)
516
516
  when "soft_break" then out << run(" ", ctx)
517
+ # A `+` continuation row join; the spec renders it as one space.
518
+ when "cell_wrap" then out << run(" ", ctx)
517
519
  when "hard_break" then out << { text: "\n" }
518
520
  # Each emphasis sort is its OWN node type. They used to be one
519
521
  # `emphasis` node carrying a `kind`, so a profile could not deny bold
@@ -587,9 +589,11 @@ module Carve
587
589
  # Both halves are inline arrays, and both reach the page: struck for the
588
590
  # replaced run, underlined for the replacement, which is what the
589
591
  # reference ANSI and HTML renderers show.
592
+ # carve-lang 0.1.3 and older publish the halves as `oldText`/`newText`
593
+ # strings; the gemspec floor still admits those engines.
590
594
  when "substitution"
591
- emit_children({ children: node[:old] }, ctx.merge(strike: true), out)
592
- emit_children({ children: node[:new] }, ctx.merge(underline: true), out)
595
+ emit_half(node[:old], node[:oldText], ctx.merge(strike: true), out)
596
+ emit_half(node[:new], node[:newText], ctx.merge(underline: true), out)
593
597
  when "smart_punctuation" then out << run(smart_punctuation_text(node), ctx)
594
598
  # A character the author escaped. The backslash is authoring syntax, so
595
599
  # the page shows the character - but the node has no children, so
@@ -646,6 +650,14 @@ module Carve
646
650
  Array(node[:children]).each { |c| emit_inline(c, ctx, out) }
647
651
  end
648
652
 
653
+ def emit_half(inlines, text, ctx, out)
654
+ if inlines.nil? && text
655
+ out << run(text.to_s, ctx)
656
+ else
657
+ emit_children({ children: inlines }, ctx, out)
658
+ end
659
+ end
660
+
649
661
  # Styling for one emphasis node.
650
662
  #
651
663
  # `/*both*/` is a single `strong` node carrying `boldItalic`, not a
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Carve
4
4
  module Hexapdf
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carve-hexapdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
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-08 00:00:00.000000000 Z
11
+ date: 2026-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carve-lang