carve-hexapdf 0.1.2 → 0.1.3
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/CHANGELOG.md +36 -0
- data/lib/carve/hexapdf/renderer.rb +23 -2
- data/lib/carve/hexapdf/version.rb +1 -1
- 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: 20e7254d5697ad9d0e7b04769f516ce56b892d09c5407fe6b6cbd3e1ed8eed7e
|
|
4
|
+
data.tar.gz: 24af38395418395895e2eb639d8f6dd1e8ce3827135e532338fd670df2b8befb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 813e1c949beb5f2047b406fa06bc1580da7e5e163d6f67b95e15ca17d06fbc037585b8435f49e60c14cfba117f74d17d5184deeb5be7f6b023071759fd2b48eb
|
|
7
|
+
data.tar.gz: 7616495f87f40f73f2edbb423fea6c7d43b9443f930cb8372542225c682383913455879045f5ed7e5fc25bf0317e4a7976f77b8c39afe9ba4e9422c937f7703d
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,42 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.3] - 2026-10-08
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **A referenced footnote's body no longer vanishes from the page.**
|
|
15
|
+
`register_footnote` matched a reference to its definition through
|
|
16
|
+
`footnote_ref[:id]`; the engine renamed that field to `label`, so no
|
|
17
|
+
definition resolved and the note text never reached the endnote section. The
|
|
18
|
+
marker still numbered itself, so a page kept `[2]` and silently lost what it
|
|
19
|
+
pointed at. Both spellings are accepted now.
|
|
20
|
+
markup-carve/carve-hexapdf#47
|
|
21
|
+
- **Cross-references reach the page.** The inline dispatcher had an arm for
|
|
22
|
+
`cross_ref` while the engine publishes `heading_ref`, so every `</#id>`
|
|
23
|
+
contributed nothing at all: `See </#Plan>.` drew `See .`. A resolved
|
|
24
|
+
reference is drawn as a link over the target heading's text, an unresolved
|
|
25
|
+
one back in its `</#id>` source spelling, which is how the HTML target
|
|
26
|
+
renders it. markup-carve/carve-hexapdf#48
|
|
27
|
+
- **The example PDFs match the engine the gemspec supports.** They had been
|
|
28
|
+
generated by carve-lang 0.1.0, the version the floor excludes, and
|
|
29
|
+
`examples/generate.rb` would silently use a `carve-rb` checkout that merely
|
|
30
|
+
happened to sit beside this one. The sibling is opt-in through
|
|
31
|
+
`CARVE_RB_PATH` now, the same variable the `Gemfile` reads.
|
|
32
|
+
markup-carve/carve-hexapdf#49
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Requires carve-rb v0.1.7 (carve-lang 0.1.7), up from an unreleased revision
|
|
37
|
+
32 commits and two releases behind it. A document containing a single `|`
|
|
38
|
+
followed by an attribute block used to abort the native extension with a
|
|
39
|
+
fatal `byte range starts at 1 but ends at 0`, killing the process rather than
|
|
40
|
+
raising, so a batch render died on five bytes of valid input; it now renders
|
|
41
|
+
as paragraph text. Cross-references, glossary terms and numbered captions
|
|
42
|
+
also compare case exactly on this engine.
|
|
43
|
+
|
|
8
44
|
## [0.1.2] - 2026-09-19
|
|
9
45
|
|
|
10
46
|
### Fixed
|
|
@@ -564,7 +564,23 @@ module Carve
|
|
|
564
564
|
out << run("[#{number}]", ctx.merge(super: true)) if number
|
|
565
565
|
when "citation_group" then out << run(node[:raw].to_s, ctx)
|
|
566
566
|
when "abbreviation" then out << run(node[:abbr].to_s, ctx)
|
|
567
|
-
|
|
567
|
+
# `heading_ref` is what `</#id>` publishes; `cross_ref` was its name
|
|
568
|
+
# before the rename and is still accepted, like the footnote arm above.
|
|
569
|
+
# Reading only `cross_ref` dropped every cross-reference from the page
|
|
570
|
+
# with no marker left behind: `See </#Plan>.` drew "See .".
|
|
571
|
+
#
|
|
572
|
+
# A resolved reference carries `href` and a `target` that is the target
|
|
573
|
+
# heading's TEXT, so it draws as a link over that text. An unresolved
|
|
574
|
+
# one carries no `href` and a `target` that is the selector as authored,
|
|
575
|
+
# which the HTML target renders as literal source - so it is drawn back
|
|
576
|
+
# in its source spelling rather than as a bare word that reads like
|
|
577
|
+
# prose.
|
|
578
|
+
when "heading_ref", "cross_ref"
|
|
579
|
+
if node[:href].to_s.empty?
|
|
580
|
+
out << run("</##{node[:target]}>", ctx)
|
|
581
|
+
else
|
|
582
|
+
out << run(node[:target].to_s, ctx.merge(link: node[:href].to_s))
|
|
583
|
+
end
|
|
568
584
|
when "caption_number" then (out << run(node[:number].to_s, ctx) if node[:number])
|
|
569
585
|
when "insert" then emit_children(node, ctx.merge(underline: true), out)
|
|
570
586
|
when "delete" then emit_children(node, ctx.merge(strike: true), out)
|
|
@@ -767,7 +783,12 @@ module Carve
|
|
|
767
783
|
return @footnotes.last[:number]
|
|
768
784
|
end
|
|
769
785
|
|
|
770
|
-
id
|
|
786
|
+
# `label` since carve-rb 0.1.4; `id` is the pre-rename spelling and is
|
|
787
|
+
# still accepted, the same way the node-type arms above accept both
|
|
788
|
+
# vocabularies. Reading only `id` silently dropped the body: the marker
|
|
789
|
+
# still numbered itself from `node[:number]`, so the page kept `[2]`
|
|
790
|
+
# and lost "2. Referenced note body." entirely.
|
|
791
|
+
id = node[:label] || node[:id]
|
|
771
792
|
if id && @footnote_defs.key?(id)
|
|
772
793
|
return @footnote_numbers[id] ||= begin
|
|
773
794
|
@footnotes << { number: @footnotes.size + 1, blocks: @footnote_defs[id] }
|
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.
|
|
4
|
+
version: 0.1.3
|
|
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-
|
|
11
|
+
date: 2026-10-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: carve-lang
|