carve-lang 0.1.13-aarch64-linux → 0.1.14-aarch64-linux

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: 465f48e463bd5a3ddfe56611ddc52bfe4d505604e9c1646792f8552e13ef2a61
4
- data.tar.gz: b13b8081960c330dfcd804a4b4fd05f4f958291892ddc470424ae0b26ed9dd99
3
+ metadata.gz: 3b5e5cee6fa092d1eaf2140218cc981dd5fcd2fda2565b5ab2ca20748c2be976
4
+ data.tar.gz: '0292a0ac3f317d7f047105d5fb2780e0972dd5a296402d9d5322a0d709c58df8'
5
5
  SHA512:
6
- metadata.gz: 2639cbee71708bdae1e5a7061c394bb3f6eb39dcbaf000db9e38ad9f117ce4cbac9dc77fceb5418d37a743fe492c1d65c9754aa552862644de4efe39df9a62b3
7
- data.tar.gz: 161e0a34e4531cdfcb304cd160af7d8e372a48f78da08b0015063c1246498a4369600e32dba3714c88e1847b08bce29799354df1124a7e0e04e01d915a1eee02
6
+ metadata.gz: 4ac4d83ef951fbb835a89fd8b8bf990c87ec0018c02c7ed341961870a86b3616c3b148c2f92fbd34da9155036ec34b33f6503222701f71816ec54e85f4d3d7f3
7
+ data.tar.gz: 66b3bdf474d4574964292c91040d1539f4d4ccb0f551ae0ba9ce87ac2069182ed05124eb8aac098da02cd1d226e7bc3c37839fe74e96e83981c11bb0889f7c4c
data/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.14] - 2026-11-12
11
+
12
+ The Ruby binding moves to the published carve-rs 0.1.14 engine and the 0.1.14 spec: one attach rule for `+`, comment lines erased before layout, braced table alignment, and a canonical writer that writes `***` and native `|=` headers.
13
+
14
+ ### Breaking
15
+
16
+ - Update to carve-rs 0.1.14. Block layout, `+` continuation markers, comment lines and lazy lines follow the 0.1.14 spec, so some documents parse differently (#237, #239, #253, #258).
17
+ - HTML import reads only `data-carve-*` roundtrip carriers; `data-djot-*` is no longer read. Lint configuration and suppression directives accept only `heading-level-skip`, not `a11y/heading-jump` (markup-carve/carve#5735).
18
+ - Lint reports a refused own-line `+` after a block as `refused-continuation-marker`; a refused first-block `+` keeps `continuation-marker-refused` (markup-carve/carve-rs#4201).
19
+ - `Carve.to_carve` writes every thematic break as `***` and table headers as native `|=` cells.
20
+
21
+ ### Improvements
22
+
23
+ - `Carve.decision_trace(source)` returns the block decision trace as JSON lines, and `Carve.lint(source, caption_hints: true)` turns on the opt-in caption hint (#244).
24
+ - Table cell alignment reads the braced form (`|={<}`, `|={~}`, `|={>}`); lint reports the 0.1.13 prefixes as `deprecated-cell-alignment`.
25
+
26
+ **Full Changelog**: https://github.com/markup-carve/carve-rb/compare/v0.1.13...v0.1.14
27
+
10
28
  ## [0.1.13] - 2026-10-25
11
29
 
12
30
  Task lists carry progress and blocked states through the Ruby binding. Rendering and import follow the 0.1.13 engine fixes.
data/README.md CHANGED
@@ -1,169 +1,26 @@
1
1
  # carve (Ruby)
2
2
 
3
- Native Ruby bindings for the
4
- [Carve](https://github.com/markup-carve/carve) markup language. The gem wraps
5
- the [carve-rs](https://github.com/markup-carve/carve-rs) engine through magnus
6
- and rb-sys rather than reimplementing the parser.
3
+ Ruby bindings for the Carve Rust engine. The gem processes Carve 0.1 documents through `carve-lang`. See the [Carve documentation](https://markup-carve.github.io/carve/).
7
4
 
8
5
  ## Install
9
6
 
10
- ```ruby
11
- gem "carve-lang"
12
- ```
13
-
14
- ```bash
15
- bundle install
16
- ```
17
-
18
- The distribution name is `carve-lang`, while the require path is `carve`.
19
-
20
- Releases after 0.1.9 ship precompiled gems for `x86_64-linux`,
21
- `x86_64-linux-musl`, `aarch64-linux`, `x86_64-darwin`, `arm64-darwin` and
22
- `x64-mingw-ucrt`, with a binary for each Ruby from 3.0 to 4.0 (from 3.1 on
23
- Windows, where Ruby 3.0 has no UCRT build). On those platforms `gem install`
24
- needs no Rust toolchain or libclang. Everywhere else, including newer Rubies,
25
- RubyGems installs the source gem and builds it as described below.
26
-
27
- ## Installing from source
28
-
29
- Version 0.1.9 and earlier ship source only, and so does every release on a
30
- platform or Ruby without a precompiled gem. There `gem install carve-lang`
31
- compiles a Rust extension on your machine, so the install needs:
32
-
33
- - A Rust toolchain with `cargo`, Rust 1.77 or newer. [rustup](https://rustup.rs)
34
- is the usual way to get one.
35
- - Ruby development headers (`ruby-dev` on Debian and Ubuntu).
36
- - libclang and clang. The build runs `bindgen` through `rb-sys` to read Ruby's
37
- C headers. On Debian and Ubuntu:
38
-
39
- ```bash
40
- sudo apt install libclang-dev clang
41
- ```
42
-
43
- If only libclang is installed, without the `clang` package, the build stops
44
- with this error:
45
-
46
- ```text
47
- /usr/include/ruby-3.2.0/ruby/ruby.h:23:10: fatal error: 'stdarg.h' file not found
48
- thread 'main' panicked at .../rb-sys-0.9.128/build/main.rs:52:6:
49
- generate bindings: ClangDiagnostic("/usr/include/ruby-3.2.0/ruby/ruby.h:23:10: fatal error: 'stdarg.h' file not found\n")
50
- error: failed to run custom build command for `rb-sys v0.9.128`
51
- ```
52
-
53
- libclang cannot find its own builtin headers. Install `clang`, or point
54
- bindgen at GCC's copy of those headers:
55
-
56
- ```bash
57
- BINDGEN_EXTRA_CLANG_ARGS="-I$(gcc -print-file-name=include)" gem install carve-lang
7
+ ```sh
8
+ gem install carve-lang
58
9
  ```
59
10
 
60
- With Bundler, export the variable before running `bundle install`.
61
-
62
- ## Render Carve
11
+ ## Usage
63
12
 
64
13
  ```ruby
65
14
  require "carve"
66
-
67
- Carve.to_html("# Hello *world*")
68
- Carve.to_markdown(source)
69
- Carve.to_plain_text(source)
70
- Carve.to_ansi(source)
71
- Carve.to_carve(source)
72
- Carve.to_carve(source, align_tables: true) # pad table columns
73
- ```
74
-
75
- Options configure extensions, safe rendering, profiles, symbols, section
76
- wrappers, and custom renderers:
77
-
78
- ```ruby
79
- Carve.to_html(
80
- source,
81
- extensions: %w[autolink list-table],
82
- safe: true,
83
- profile: "comment",
84
- )
15
+ puts Carve.to_html("# Hello *world*")
85
16
  ```
86
17
 
87
- `Carve::EXTENSIONS` reports the names accepted by the bundled engine. Unknown
88
- names raise `ArgumentError`.
89
-
90
- ## Errors
91
-
92
- An invalid argument raises `ArgumentError`, and a render the engine refuses -
93
- input past a profile's `max_length`, or a denied construct - also raises
94
- `ArgumentError` with the engine's reason.
95
-
96
- If the engine panics, the call raises `Carve::EnginePanic`, a `StandardError`
97
- subclass carrying the panic message and its location in the engine source. A
98
- panic means the engine reached a state it believed impossible, so the document
99
- is not renderable, but the process survives and a host can serve an error
100
- instead of losing the worker:
101
-
102
- ``` ruby
103
- begin
104
- Carve.to_html(untrusted_source)
105
- rescue Carve::EnginePanic => e
106
- logger.error("carve engine panic: #{e.message}")
107
- "<p>This document could not be rendered.</p>"
108
- end
109
- ```
110
-
111
- Report any input that raises it: a panic is an engine defect, not a rejection.
112
-
113
- ## Migration and AST access
114
-
115
- `Carve.from_html` and `Carve.from_markdown` return canonical Carve with
116
- structured fidelity reports. `Carve.parse` exposes a Ruby hash representation
117
- of the AST, and static rendering produces self-contained output for documents
118
- that do not load client-side renderers.
119
-
120
- The [usage reference](docs/reference.md) documents AST fields, static
121
- rendering, symbols, wrappers, profiles, and the main methods.
122
-
123
- ## Includes
124
-
125
- Includes are opt-in and require an absolute containment root plus the source
126
- document's absolute path:
127
-
128
- ```ruby
129
- result = Carve.to_html_with_includes(
130
- File.read("book.crv"),
131
- root: File.expand_path("."),
132
- source_path: File.expand_path("book.crv"),
133
- )
134
- ```
135
-
136
- The result contains the value, warnings, and root-relative dependencies. A
137
- warning from an included file names the chain of directives that reached it in
138
- `:includedBy`.
139
- Other render methods leave directives literal. See the
140
- [include reference](docs/reference.md#file-includes) for budgets, AST expansion,
141
- targets, and containment behavior.
142
-
143
- ## Lint
144
-
145
- `Carve.lint(source)` reports constructs that render but lose what the author
146
- wrote, such as an unattached attribute or a link to a missing id:
147
-
148
- ```ruby
149
- Carve.lint("é [x](#nope)\n").map { |f| [f[:rule], f[:line], f[:column]] }
150
- # => [["broken-fragment-link", 1, 3]]
151
- ```
152
-
153
- Columns and the `:start`/`:end` offsets count characters, not bytes. Pass
154
- `root:` and `source_path:` to lint included files too; each such finding names
155
- its file and the `:includedBy` chain. See the
156
- [lint reference](docs/reference.md#linting).
157
-
158
- ## Security
18
+ ## Documentation
159
19
 
160
- Use `safe: true` and a restrictive profile for untrusted documents. Custom
161
- renderer callbacks and symbol values are trusted output and may emit raw HTML.
162
- The [untrusted-input reference](docs/reference.md#untrusted-input) describes
163
- resource limits and URL handling.
20
+ - [Carve documentation](https://markup-carve.github.io/carve/)
21
+ - [Guide](docs/guide.md)
22
+ - [Documentation index](docs/README.md)
164
23
 
165
- ## Development
24
+ ## License
166
25
 
167
- Source builds, tests, and the carve-rs dependency pin are documented under
168
- [Development](docs/reference.md#develop) and
169
- [carve-rs dependency pin](docs/reference.md#carve-rs-dependency-pin).
26
+ [MIT](LICENSE).
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
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.13"
11
+ VERSION = "0.1.14"
12
12
  end
data/lib/carve.rb CHANGED
@@ -172,7 +172,9 @@ module Carve
172
172
  # The engine reports no severity: every finding is a warning.
173
173
  #
174
174
  # Pass the same +extensions:+ you render with, since they change which
175
- # constructs are elements and which rules apply.
175
+ # constructs are elements and which rules apply. +caption_hints: true+
176
+ # turns on the opt-in +caption-looking-paragraph+ hint for a paragraph
177
+ # beside an image or table that reads like a caption.
176
178
  #
177
179
  # ==== Following includes
178
180
  #
@@ -183,7 +185,7 @@ module Carve
183
185
  # top-level first, as +{file:, line:, column:}+. The budgets
184
186
  # (+max_depth:+ and the rest) mean what they mean for rendering.
185
187
  def lint(source, extensions: nil, root: nil, source_path: nil, max_depth: nil,
186
- max_bytes: nil, max_resolver_calls: nil, max_warnings: nil)
188
+ max_bytes: nil, max_resolver_calls: nil, max_warnings: nil, caption_hints: false)
187
189
  JSON.parse(
188
190
  _lint_json(
189
191
  source.to_s,
@@ -194,6 +196,7 @@ module Carve
194
196
  max_bytes,
195
197
  max_resolver_calls,
196
198
  max_warnings,
199
+ caption_hints ? true : false,
197
200
  ),
198
201
  symbolize_names: true,
199
202
  )
@@ -420,8 +423,8 @@ module Carve
420
423
  # Frontmatter is the first child, carrying +:format+ and RAW +:content+.
421
424
  #
422
425
  # Every node is a Hash with a +:type+ key plus its fields; child collections
423
- # are Arrays; +:attrs+ is +nil+ or a Hash of +{id:, classes:, key_values:}+.
424
- # Keys are symbols. This is the raw parse tree (default profile, no
426
+ # are Arrays; +:attrs+ is +nil+ or a Hash holding whichever of +:id+,
427
+ # +:classes+, +:keyValues+ and +:order+ the source wrote. Keys are symbols. This is the raw parse tree (default profile, no
425
428
  # extensions), suitable for a custom renderer (e.g. Carve -> PDF).
426
429
  def parse(source)
427
430
  # max_nesting: false - the engine already bounds nesting (its own
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.13
4
+ version: 0.1.14
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - markup-carve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-25 00:00:00.000000000 Z
11
+ date: 2026-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake