carve-lang 0.1.10-aarch64-linux → 0.1.12-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: b214f8dbf9f5c494a35507e7636deb76e57e9731ea0e41576a4ed5fa15e32a82
4
- data.tar.gz: b93ce900782e080a60f87bcc370490465d7746b3cdd1fb3898ff0d188159c0d0
3
+ metadata.gz: 53e586d63a6d53682f45955244c0d3c9c7631a879b8aa91e7df3327d4204af56
4
+ data.tar.gz: 6ed30946fc41d2f2f2baed993415cdce3ab6727c339fbf35ca4434ea4ed229a6
5
5
  SHA512:
6
- metadata.gz: 4fd189dfc7372fef16f44d2c5d15cac5e88b78062d0e6ef7e4f620b2b4faa5b6b363fc0590d154c38972241c522e089f7cc731eed3275ce404f570825cc5191f
7
- data.tar.gz: 9242e5b9e6dc0f76f06846f84e8df95163550d7d97a1a19bb737eaae1e87db840bf5b6981d20d404807c4fb332b90e8e24a10b993f4f79224631066787e4acf2
6
+ metadata.gz: 53a9c3fbe4f5abd6c6ae897c40914ee4521c5122e191ae80dda6c7199a4d72e51d53eeef9c8db3d926e6e8d273be2f10eb4ea604d1bf698e8822116bb9eb2c23
7
+ data.tar.gz: ba818e73929cb3907c07eb786c86d59cf1cd1ce3996248a4abb2a7e37eb1a677b89075389a266493bbbf1f861dd1ec2fef97949554b91bf296da5957588f92c8
data/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.12] - 2026-10-24
11
+
12
+ ### Improvements
13
+
14
+ - Update to the published carve-rs 0.1.12 engine. Table spans, wrapped attributes, and continuation markers follow the latest spec rules. Markdown output reports four new loss codes: `markdown-container-flattened`, `markdown-caption-flattened`, `markdown-attributes-dropped`, and `raw-html-escaped` (#228).
15
+
16
+ ## [0.1.11] - 2026-10-23
17
+
18
+ ### Improvements
19
+
20
+ - `Carve.lint(source, extensions:)` exposes the engine's linter: findings carry
21
+ the rule id, message, 1-based line and column, and character offsets. With
22
+ `root:` and `source_path:` it lints included files and reports each finding's
23
+ file and `includedBy` chain (#223).
24
+
10
25
  ## [0.1.10] - 2026-10-23
11
26
 
12
27
  ### Breaking
@@ -527,7 +542,9 @@ are not listed, because no release ever shipped them.
527
542
  Arrays (every AST node type is covered), enabling custom renderers such as
528
543
  [carve-hexapdf](https://github.com/markup-carve/carve-hexapdf).
529
544
 
530
- [Unreleased]: https://github.com/markup-carve/carve-rb/compare/v0.1.10...HEAD
545
+ [Unreleased]: https://github.com/markup-carve/carve-rb/compare/v0.1.12...HEAD
546
+ [0.1.12]: https://github.com/markup-carve/carve-rb/compare/v0.1.11...v0.1.12
547
+ [0.1.11]: https://github.com/markup-carve/carve-rb/compare/v0.1.10...v0.1.11
531
548
  [0.1.10]: https://github.com/markup-carve/carve-rb/compare/v0.1.9...v0.1.10
532
549
  [0.1.9]: https://github.com/markup-carve/carve-rb/compare/v0.1.8...v0.1.9
533
550
  [0.1.8]: https://github.com/markup-carve/carve-rb/compare/v0.1.7...v0.1.8
data/README.md CHANGED
@@ -140,6 +140,21 @@ Other render methods leave directives literal. See the
140
140
  [include reference](docs/reference.md#file-includes) for budgets, AST expansion,
141
141
  targets, and containment behavior.
142
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
+
143
158
  ## Security
144
159
 
145
160
  Use `safe: true` and a restrictive profile for untrusted documents. Custom
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.10"
11
+ VERSION = "0.1.12"
12
12
  end
data/lib/carve.rb CHANGED
@@ -150,6 +150,55 @@ module Carve
150
150
  )
151
151
  end
152
152
 
153
+ # Report constructs that parse and render, but not the way the author
154
+ # meant: an attribute that attaches to nothing, an unclosed fence, a
155
+ # fragment link with no target.
156
+ #
157
+ # Carve.lint("Text.\n\n{#gone}\n")
158
+ # # => [{rule: "unattached-block-attribute", message: "...", line: 3,
159
+ # # column: 1, start: 7, end: 14, file: nil, includedBy: []}]
160
+ #
161
+ # Returns an Array of Hashes, empty for a clean document:
162
+ #
163
+ # * +:rule+ - the engine's stable rule id, the same in every Carve engine.
164
+ # * +:message+ - what degrades, in prose.
165
+ # * +:line+, +:column+ - 1-based; the column counts characters, not bytes.
166
+ # * +:start+, +:end+ - 0-based character offsets into +source+, end
167
+ # exclusive, so <tt>source[f[:start]...f[:end]]</tt> is the offending text.
168
+ # +nil+ on a finding the include pass adds (below), whose offsets would
169
+ # index another text.
170
+ # * +:file+, +:includedBy+ - see below; +nil+ and +[]+ without includes.
171
+ #
172
+ # The engine reports no severity: every finding is a warning.
173
+ #
174
+ # Pass the same +extensions:+ you render with, since they change which
175
+ # constructs are elements and which rules apply.
176
+ #
177
+ # ==== Following includes
178
+ #
179
+ # With +root:+ and +source_path:+ (absolute, as for .to_html_with_includes)
180
+ # the pass also lints every included Carve file and reports include
181
+ # directives that stay literal (a missing target, a cycle, a budget). Such a
182
+ # finding names its +:file+ relative to the root and its +:includedBy+ chain,
183
+ # top-level first, as +{file:, line:, column:}+. The budgets
184
+ # (+max_depth:+ and the rest) mean what they mean for rendering.
185
+ def lint(source, extensions: nil, root: nil, source_path: nil, max_depth: nil,
186
+ max_bytes: nil, max_resolver_calls: nil, max_warnings: nil)
187
+ JSON.parse(
188
+ _lint_json(
189
+ source.to_s,
190
+ Array(extensions).map(&:to_s),
191
+ root&.to_s,
192
+ source_path&.to_s,
193
+ max_depth,
194
+ max_bytes,
195
+ max_resolver_calls,
196
+ max_warnings,
197
+ ),
198
+ symbolize_names: true,
199
+ )
200
+ end
201
+
153
202
  # Format +source+ into canonical Carve. A writer refusal returns the source
154
203
  # as authored. +align_tables:+ pads table cells into aligned columns.
155
204
  def to_carve(source, align_tables: false)
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.10
4
+ version: 0.1.12
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-23 00:00:00.000000000 Z
11
+ date: 2026-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake