Repository navigation
Releases
0.1.18
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
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()andconvertWithReport()return HTML without the final newline;render()and streaming keep it (#4050).carve fmtwrites thematic breaks as***(#4516).- Lint rule ids were merged or retired (
table-marker-run-padding,fence-delimiter-indentation,raw-block-syntax, thea11y/heading-jumpalias). Update suppressions that name them (#3976, #4446, #4454, #5068). - The HTML importer no longer reads
data-djot-*carriers (carve#5735, #5068). ProseMirrorRendererwritescarvePosonly withwithSourcePositions()(#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 --astno 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
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
preclass 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
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
- Djot import preserves link targets, reference destinations, backslashes, literal symbols, quote direction, emphasis boundaries, heading IDs, and extension fences and titles (#3775, #3776, #3777, #3781, #3785, #3786, #3787, #3791, #3795, #3797, #3798, #3807, #3808, #3810, #3813, #3815, #3817, #3818, #3822, #3828, #3864).
- Djot footnotes reserve their IDs before headings receive matching suffixes (#3821).
- Markdown export escapes literal definition and term markers, keeps nested heading fences compact, and retains separator widths when table columns are edited (#3846, #3854, #3855, #3867, #3884).
- Tables retain left alignment on empty headers, read padded span markers, keep column defaults within resolved header rows, and report Markdown render losses from the schema (#3865, #3878, #3879, #3880, #3882, #3885, #3889).
- Nested lists, notes, quotes, and descriptions keep continuation markers, blank lines, wrapped attributes, and definition text with the owning block (#3762, #3799, #3806, #3809, #3830, #3829, #3845, #3847, #3849, #3852, #3869, #3888).
- Adjacent highlighted code blocks retain their whitespace (#3760).
Improvements
- Cross-references to headings supplied by includes now resolve (#3824).
Full Changelog: 0.1.14...0.1.15
0.1.14
Carve 0.1.14 adds code-block includes, include linting and aligned tables, and fixes continuation markers, nested lists and quotes.
Breaking
carve lintprintsfile:line:col rule — message; update anything that parses lint output (#3562).- Converter helpers moved into per-format namespaces such as
Converter\Markdown; updateusestatements (#3747). - Subclasses overriding protected
MarkdownToCarve,BlockParser,TableParserorHtmlRenderermembers, ortoCarve(),renderBlocks(),formatAttribution()andregionRange(), 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-tablesaligns columns by display width (#3546).- Includes insert files or regions as code blocks, and
carve lintchecks 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
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.2withresolved, a rootastVersionandcomment.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 mergeignores rewrapping (#3432, #3436, #3459).
Improvements
{table}before acsvortsvfence 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 markdownconverts 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
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]: expansionas an abbreviation; passconvertAbbreviations: falsefor the old reading (#3327). - One roundtrip option (
roundTripMode: true,carve --roundtrip) writesdata-carve-*carriers, andHtmlToCarvedropstrustedRoundTrip(#3145, #3081). - A bare
<div class="line-block">imports as an admonition, and AST JSON omits the defaultdelimandbulletChar(#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
fmtwrites them back unchanged (#3290, #3359, #3252).
Improvements
- AST contract 1.1 adds table separator widths and
cell_wrapnodes (#3093, #3335). - Task lists render
class="task-list", and--smart-typography quotes-sourcekeeps source quotes (#3071, #3067). - The new
table-span-marker-blockedlint, and faster import and export on long documents (#3422, #3404).
Full Changelog: 0.1.11...0.1.12
0.1.11
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-deniedcode, so theCARVE-P2-024enum names three codes rather than two. The emittedhref=""andsrc=""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
RenderTargetconstants with unchanged values (#2788, #2789). - An include can select a block by id (#2876).
lintreports 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).
lintandfmt --migratecompare references against rendered heading ids rather than the authored text, and a reference image with no definition is reported under the existingunresolved-reference-linkrule (#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-overindentedis 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
Breaking
- AST payload changes:
code_block.contentkeeps the break after its last line, escaped spaces and line-block columns arenon_breaking_spacenodes (U+E000 is literal, so reparse trees stored under the old marker), and class slots keep every authored entry viagetClassList()/setClassList()(#2468, #2585, #2755). - AST ingest is stricter: it refuses container-internal types in
children, afootnote_refwith no target and an empty admonitionkind, and the schema validator honorsnot(#2271, #2409). StoredPayloadUpgradeis removed (upgrade old payloads with 0.1.9 or earlier first), as areBlockParser's protected definition collectors andReferenceDefinitionExtractor::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
codeenum closes atraw-format-droppedandruby-flattened,--report-conversion-diagnosticsno longer needs--carve, and--allow-lossaccepts 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 fmtwrite 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 fmtwrites 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-truncatedrow 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,
LinkPolicyreads the host a browser reads, and a denied-scheme destination imports as its content (#2327, #2334, #2617). - A
::: footnotesmarker 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).
AstEnvelopereads 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()andgetCaptions()(#2260). carve lintgains reference, footnote and container diagnostics (#2417, #2600).--list-tablefor 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
Breaking
- The ProseMirror bridge no longer reports a rejected mention name or a differing display label under
droppedAttributes(); read the newProseMirrorToCarve::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