Skip to content

Releases

0.1.18

Choose a tag to compare

@dereuromark dereuromark released this 21 Nov 02:17
540daa8

carve-php 0.1.18 makes HTML tables with pipes in their cells convert quickly again, plus two block-level fixes.

Fixes

  • HTML import and the Carve writer escape a | in a table cell directly. A 73-row table with pipes in its cells now converts in 0.6s instead of 6s. The output drops a few needless escapes and renders the same (#5473).
  • On PHP 8.2 and 8.3, HTML import keeps a processing instruction containing -- or ending in - (<?a--b>) as a comment, as PHP 8.4 does, whatever the libxml version (#5473).
  • A fence after a closed +-attached fence keeps its blank lines and the lines after them as payload. Large documents that hit this need less than half the memory and output (#5220).
  • convert() renders a list with a blank line before a nested list on the fast HTML path again (carve#6026).

Full Changelog: 0.1.17...0.1.18

0.1.17

Choose a tag to compare

@dereuromark dereuromark released this 12 Nov 10:04
fa017b5

carve-php 0.1.17 implements the Carve 0.1.14 spec: + attaches blocks the same way in every container, comments no longer split what is around them, and an unclosed attribute brace stays literal text. Markdown import follows CommonMark 0.31.

Breaking

  • CarveConverter::convert() and convertWithReport() return HTML without the final newline; render() and streaming keep it (#4050).
  • carve fmt writes thematic breaks as *** (#4516).
  • Lint rule ids were merged or retired (table-marker-run-padding, fence-delimiter-indentation, raw-block-syntax, the a11y/heading-jump alias). Update suppressions that name them (#3976, #4446, #4454, #5068).
  • The HTML importer no longer reads data-djot-* carriers (carve#5735, #5068).
  • ProseMirrorRenderer writes carvePos only with withSourcePositions() (#4949).

Fixes

  • Security: the ProseMirror bridge and Markdown import drop link, image and attribute values whose scheme the HTML target denies (carve#6009, #5193, #5194).
  • Lists, notes, quotes and fences keep their lines across lazy lines, blank runs, comments and tabs, as the spec defines.
  • carve --ast no longer crashes on a file containing {{ (#4614).

Improvements

  • Lint suppression comments and a set of authoring rules for Markdown habits (#4192, #4482).
  • carve trace <file> prints the block decision trace (#4294).
  • Long documents parse and lint in linear time.

Full Changelog: 0.1.16...0.1.17

0.1.16

Choose a tag to compare

@dereuromark dereuromark released this 25 Oct 19:14
20d9207

Task lists gain progress and blocked states, and imports and the writer keep more of what was authored.

Fixes

  • Nested lazy continuation survives folded fences, and folded HTML container labels keep their text (#3926, #3924).
  • HTML import bounds table spans, reads a lone plain pre class as the code language, and keeps GitHub footnotes, Djot attributes and integral pixel image sizes; Markdown export keeps covered-column alignment (#3922, #3902, #3897, #3900, #3905).
  • Tabs stay content in empty link destinations and line comments, Markdown destination parentheses keep their text, and the writer picks literal backslash spelling by reparsing (#3928, #3929, #3911, #3912).
  • Markdown conversion reports a fence title dropped because the fence has no language (#3931).

Improvements

  • Task lists parse progress [/] and blocked [!] and keep them through AST JSON, HTML import and formatting; [_] is an open-task alias (#3920).

Full Changelog: 0.1.15...0.1.16

0.1.15

Choose a tag to compare

@dereuromark dereuromark released this 24 Oct 18:12
df08f6e

carve-php 0.1.15 keeps imported Djot and Markdown closer to their source and corrects table layout, nested containers, and render-loss reports.

Fixes

Improvements

  • Cross-references to headings supplied by includes now resolve (#3824).

Full Changelog: 0.1.14...0.1.15

0.1.14

Choose a tag to compare

@dereuromark dereuromark released this 23 Oct 09:22
8f18222

Carve 0.1.14 adds code-block includes, include linting and aligned tables, and fixes continuation markers, nested lists and quotes.

Breaking

  • carve lint prints file:line:col rule — message; update anything that parses lint output (#3562).
  • Converter helpers moved into per-format namespaces such as Converter\Markdown; update use statements (#3747).
  • Subclasses overriding protected MarkdownToCarve, BlockParser, TableParser or HtmlRenderer members, or toCarve(), renderBlocks(), formatAttribution() and regionRange(), must adopt the public API or new signatures (#3740, #3748, #3750, #3546).

Fixes

  • Continuation markers, including stacked - > + and quoted +, attach followers at the column the spec allows, and lint reports refusals where they occur (#3592, #3659, #3731, #3732).
  • Wrapped block attributes, unclosed fences and nested lists end at the right owner (#3730, #3737, #3745, #3753).
  • Descriptions, footnotes and list tightness follow authored columns (#3644, #3667, #3702).
  • Markdown and HTML import keep destination spelling and Unicode text, and write nested imports in canonical Carve (#3579, #3597, #3670).

Improvements

  • carve fmt --align-tables aligns columns by display width (#3546).
  • Includes insert files or regions as code blocks, and carve lint checks included content (#3544, #3557).
  • Lists, link destinations and footnotes parse with fewer repeated scans (#3710, #3729).

Known issue

  • Importing quotes and lists runs about 1.6 to 2 times slower (#3670).

Full Changelog: 0.1.13...0.1.14

0.1.13

Choose a tag to compare

@dereuromark dereuromark released this 18 Oct 01:33
04f6fb4

Carve 0.1.13 adds CSV tables, named include regions and folder migration.

Breaking

  • [text]() and bare [r]: now have empty URLs (#3448, #3472).
  • AST JSON moves to contract 1.2 with resolved, a root astVersion and comment.form. 0.1.12 and other 1.1 readers refuse it (#3502).
  • Flattened table spans and rewritten header rows report losses; allow accepted codes with --allow-loss (#3456, #3473).

Fixes

  • Autolinks, cross-references and comments stay atomic, and a delimiter before a combining mark stays text (#3481, #3437, #3464).
  • An unclosed fence in a ::: container ends at its closer (#3453, #3496, #3505).
  • Description lists, footnotes, quotes and items keep their paragraphs, comments and attribute lines at the right column (#3513, #3516, #3525, #3528).
  • Escaped wikilinks and includes stay literal; carve merge ignores rewrapping (#3432, #3436, #3459).

Improvements

  • {table} before a csv or tsv fence produces a table. Formatting preserves the source form; rows and cells carry source positions (#3529, #3533, #3535, #3536, #3537).
  • Plain text and ANSI keep continuation paragraphs, code and quotes under their list item (#3532).
  • carve migrate --from markdown converts a folder and its local links (#3478, #3489, #3493).
  • Includes select named source regions (#3518).

Full Changelog: 0.1.12...0.1.13

0.1.12

Choose a tag to compare

@dereuromark dereuromark released this 14 Oct 14:45
4f85fe1

carve-php 0.1.12 makes Djot and Markdown import much more faithful, adds one roundtrip export option and tightens table spans.

Breaking

  • Markdown import reads *[TERM]: expansion as an abbreviation; pass convertAbbreviations: false for the old reading (#3327).
  • One roundtrip option (roundTripMode: true, carve --roundtrip) writes data-carve-* carriers, and HtmlToCarve drops trustedRoundTrip (#3145, #3081).
  • A bare <div class="line-block"> imports as an admonition, and AST JSON omits the default delim and bulletChar (#3324, #2986).
  • Alt text and quoted include paths resolve backslash escapes, so double a literal backslash. The rename warning is include-id-rename (#2951, #2954, markup-carve/carve#2772).

Fixes

  • Djot import keeps scopes, attributes, ownership, task markers and DIV openers as Djot reads them (#2962, #3402, #3421).
  • Markdown import and export keep front matter, table cells, titles, breaks and footnotes (#2943, #3104, #3399).
  • Table spans, continuation rows and container ownership follow the spec, and fmt writes them back unchanged (#3290, #3359, #3252).

Improvements

  • AST contract 1.1 adds table separator widths and cell_wrap nodes (#3093, #3335).
  • Task lists render class="task-list", and --smart-typography quotes-source keeps source quotes (#3071, #3067).
  • The new table-span-marker-blocked lint, and faster import and export on long documents (#3422, #3404).

Full Changelog: 0.1.11...0.1.12

0.1.11

Choose a tag to compare

@dereuromark dereuromark released this 07 Oct 16:42
61a3519

Name lookups compare case exactly in this release, which changes how existing documents resolve. Lint your documents and review the output before deploying. fmt --migrate repairs unambiguous case-only misses; include selectors, glossary references and external fragment links need a manual pass. The migration guide walks through it.

Breaking

  • Heading cross-references, numbered caption and equation references, and collapsed references compare case exactly. A case-only mismatch no longer resolves (#2874).
  • A glossary reference matches its term exactly, and a glossary id keeps its case, so terms differing only in case take two ids (#2895).
  • An include renames a colliding explicit id on any element, giving each later occurrence its own least free suffix; a reference written in the same inclusion follows the rename (#2876).
  • A blanked destination from the sink denylist owes a render-loss row under the new destination-denied code, so the CARVE-P2-024 enum names three codes rather than two. The emitted href="" and src="" are unchanged (#2802).

Added

  • A custom renderer can declare its report target and read converter configuration through renderer capability interfaces, without inheriting a built-in renderer, and the built-in target names are available as RenderTarget constants with unchanged values (#2788, #2789).
  • An include can select a block by id (#2876).
  • lint reports a fragment link that matches no id, reading ids from the caller's own render rather than a default one (#2866).

Fixes

  • Lists, description bodies and verse read indentation correctly in a family of cases where a flush-left line below a closed nested fence landed in the wrong block (#2901, #2905).
  • A collapsed reference image no longer resolves against a heading; the fallback stays for collapsed reference links (#2902).
  • lint and fmt --migrate compare references against rendered heading ids rather than the authored text, and a reference image with no definition is reported under the existing unresolved-reference-link rule (#2897, #2908).
  • The Carve writer round-trips backslashes in quoted attribute values and titles, parentheses under every URL scheme, and emphasis inside a link label (#2774, #2808).
  • The Markdown and Djot importers keep autolinks, reference labels and titles, quote depth across lazy lines, list-item columns, emphasis pairing and opaque fences that earlier releases rewrote or dropped (#2770, #2792).
  • Table conversion preserves multiple bodies, intermediate headers, empty bodies, row-header counts and decimal column widths through parsing, import, export and rendering (#2839, #2848).
  • list-item-block-overindented is reported once at each block's opener instead of once per line (#2779).
  • A failed parse leaves PHP's cycle collector enabled again (#2886).

Improvements

  • Parsing, HTML rendering and import, AST merges and editor batches are substantially faster on large documents, and memory a document could previously grow without limit is bounded (#2911, #2864).

Full Changelog: 0.1.10...0.1.11

0.1.10

Choose a tag to compare

@dereuromark dereuromark released this 29 Sep 22:41
6d94607

Breaking

  • AST payload changes: code_block.content keeps the break after its last line, escaped spaces and line-block columns are non_breaking_space nodes (U+E000 is literal, so reparse trees stored under the old marker), and class slots keep every authored entry via getClassList() / setClassList() (#2468, #2585, #2755).
  • AST ingest is stricter: it refuses container-internal types in children, a footnote_ref with no target and an empty admonition kind, and the schema validator honors not (#2271, #2409).
  • StoredPayloadUpgrade is removed (upgrade old payloads with 0.1.9 or earlier first), as are BlockParser's protected definition collectors and ReferenceDefinitionExtractor::extract() / getLayoutEvents() (#2248, #2259).
  • HTML import uses PHP's native HTML5 parser on PHP 8.4+ and libxml below, so malformed HTML and diagnostics can differ by PHP version (#2546).
  • HTML import puts a link's or span's edge whitespace outside it as one space, and the raw-keep report rows change (#2361, #2485).
  • Parsing: a parenthesized link title is prose, a generated-content ::: kind is a directive, [-]-style checkboxes need the tasklist extension, and a " inside a quoted fence or directive title is dropped (#2195, #2329, #2376, #2398).
  • Output: every empty block container keeps one blank HTML body line, lone brackets inside spans, links and notes are always escaped, and the writer refuses an empty emphasis mark (#2207, #2256, #2487).
  • The ProseMirror wire contract follows the pinned carve-grammars schema, adding directive, block extension, ruby and small-caps nodes; older payloads still read (#2407).
  • The render-loss code enum closes at raw-format-dropped and ruby-flattened, --report-conversion-diagnostics no longer needs --carve, and --allow-loss accepts two names instead of three (#2479).

Fixes

  • Fences and comments inside containers keep their payload, blank lines and closers at the right column, without loosening lists or raising definition lists (#2598, #2609, #2671, #2725, #2732).
  • Lists, quotes and continuation markers read tightness, lazy lines and interrupts at the column each item reaches (#2264, #2351, #2465, #2715, #2750).
  • Tables: closed pipe rows under a paragraph stay text, spanning cells publish their extent, and a rowspan across row groups renders in one body (#2292, #2309, #2364, #2434).
  • The Carve writer and carve fmt write titles, figures, attribute lines, link padding and {loose} the way they read back (#2422, #2548, #2590, #2763).
  • Markdown output reads correctly in a GFM reader and keeps list items' blocks, tightness, fenced blank lines and frontmatter (#2446, #2500, #2742).
  • The Markdown importer follows the shared converter corpus, so fences, lists, quotes, destinations, language hints and escapes match what carve fmt writes and cmark-gfm reads (#2266, #2280, #2282, #2676, #2677).
  • The HTML importer keeps headings, lists, code, tables and quotes nested under unsupported elements (importing a README used to lose them), keeps raw regions whole, and returns the document with a diagnostics-truncated row at the diagnostic cap (#2297, #2424, #2474, #2505, #2521).
  • The Djot and BBCode importers keep heading continuations, escaped delimiters and formatting tags as the writer would spell them (#2213, #2673).
  • Class hardening drops only the refused entry, LinkPolicy reads the host a browser reads, and a denied-scheme destination imports as its content (#2327, #2334, #2617).
  • A ::: footnotes marker inside a container renders where it stands, directive titles render where their region can hold them, and AST child mutations keep parent links consistent (#2352, #2395, #2550).

Improvements

  • Editor-facing AST APIs for node identity, annotation ranges, provenance and reversible patches, plus editor sessions with bounded HTML streaming (#2456, #2624).
  • AstEnvelope reads and writes the versioned AST interchange envelope and refuses newer contracts, missing extensions and foreign vocabularies distinctly (#2453).
  • The Carve writer reports what it cannot spell through --report-conversion-diagnostics (#2331).
  • Ruby annotations, line-block ranges, explicit sections, block table cells and block extensions with their fallback survive AST interchange (#2290, #2319, #2323).
  • Figure nodes expose getTargets(), getCaption() and getCaptions() (#2260).
  • carve lint gains reference, footnote and container diagnostics (#2417, #2600).
  • --list-table for list-table import, and HTML import reads code-language hints from Sphinx, GitHub and MediaWiki wrappers (#2504, #2525).
  • Faster HTML rendering of nested lists and quotes, BBCode import, and HTML migration, which needs about a third fewer re-parses (#2220, #2247, #2477, #2766).

Details in the CHANGELOG.

Full Changelog: 0.1.9...0.1.10

0.1.9

Choose a tag to compare

@dereuromark dereuromark released this 19 Sep 10:01
d4b5338

Breaking

  • The ProseMirror bridge no longer reports a rejected mention name or a differing display label under droppedAttributes(); read the new ProseMirrorToCarve::degradedAttributes() for losses that keep the text (#2175).

Fixes

  • A mention or tag that carries no name is dropped and reported instead of refusing the whole document (#2176).
  • A caption's # placeholder stays literal inside inline markup, and the Carve writer no longer escapes the bare one (#2181, markup-carve/carve#2112).

Improvements

  • Loss reports from the ProseMirror bridge are keyed and worded the way carve-rs and carve-grammars write them, so two engines' reports compare directly (#2175).

Details in the CHANGELOG.

Full Changelog: 0.1.8...0.1.9