Repository navigation
Releases: markup-carve/cakephp-carve
Releases · markup-carve/cakephp-carve
Release list
0.1.3
Rendering and conversion now follow the published carve-php 0.1.15 engine.
Fixes
- Table spans, wrapped attributes in definitions and quotes, and lone
+markers follow the current Carve rules through carve-php 0.1.15.
Improvements
- The guide now covers the plugin from installation through rendering, validation, caching, and commands (#3).
Full Changelog: 0.1.2...0.1.3
0.1.2
Fixes
rawHtmlnow applies only undersafeMode: true. WithsafeMode: 'strict'or an explicitSafeModeinstance it is ignored, so an app-widerawHtml: 'allow'can no longer let raw HTML through thecommentpreset or strict mode.carve render,carve convert --outputandcarve format --writewrite through a temp file and rename it over the target, so a failed write leaves the original intact. The command needs write access to the target's directory, and refuses a file owned by another user rather than taking it over.- Configured extensions now run for text, Markdown and ANSI output, not only HTML.
CarveBehaviorregenerates its text and TOC fields when one of them was set directly, as it already did for the HTML field.- A layout placeholder value containing
{{content}}no longer creates a second body slot inCarveView. - Validation option
strictused to be passed to the engine as strict parsing, undocumented. It now fails validation on any parse warning and names up to three of them.
Improvements
rawHtml(strip,escape,allow) sets raw HTML handling undersafeMode: true.allowpasses raw HTML verbatim and is for trusted authors only; the default stays the engine's.cache.versionenters the cache key and allows caching with extension instances, closures andrenderers. A closure is keyed by where it is defined and the values it captures; one whose captures cannot be serialized is not cached.includeResolvertakes a custom include resolver forrenderFile(); implementingIncludeCacheKeyProviderlets it take part in the file cache.CarveRenderer::lintFile()lints a file with its includes through the configured resolver;carve lintuses it.carve render --format html|text|markdown|ansi, backed by the newCarveRenderer::toAnsi()andrenderFileAs().carve format --align-tables, andformat()takes$alignTables.CarveHelper::file(),lint()andformat().- Diagram presets
d2,graphviz,wavedrom,abc,vega_liteandchartare available by name. - File render reports expose
dependencies()andsuppressedWarnings().
CarveRendererInterface gains toAnsi(), renderFileAs() and lintFile(), and format() gains an optional $alignTables. Custom renderers implementing the interface need these additions.
Full Changelog: 0.1.1...0.1.2
0.1.1
Fixes
CarveBehaviorno longer saves a generated field that was set directly while its source field was not loaded. An entity loaded with onlyidandbody_htmlcould havebody_htmlset to raw HTML and stored unrendered; such a value is now discarded.- File renders and string renders no longer share render cache keys, so a string can never be served a cached file render.
- A relative
includeRootnow expands includes instead of failing; it resolves against the current working directory. RenderedCarve::meta()reads YAML frontmatter throughsymfony/yamlwhen the app has it, falling back to theyamlPHP extension. Before, it needed the extension and returned no metadata without it.
Improvements
labelsoverrides the strings the engine writes itself rather than the author, such as the footnote backlink or the table-of-contents label, keyed as in carve-php'sHtmlRenderer::LABEL_DEFAULTS.roundTripModeadds round-trip carriers to HTML and Markdown output.renderersmaps an extension name (mermaid,chart,math) to a closure that renders its source at build time instaticmode. Setting it disables the render cache, since a closure cannot be keyed across requests.
With these, every carve-php render option is configurable under the Carve key; a test now fails if a new engine option is left out.
Full Changelog: 0.1.0...0.1.1
0.1.0
First release of the CakePHP 5 plugin for Carve, the sibling of laravel-carve, symfony-carve and tempest-carve. Requires CakePHP 5.2+, PHP 8.2+ and markup-carve/carve-php ^0.1.14.
Features
CarveRendererrenders HTML, plain text and Markdown, formats and lints Carve, and imports Markdown, HTML, Djot and BBCode.render()returns aRenderedCarvewith the table of contents, frontmatter and warnings.- The engine's render options are configurable under the
Carvekey: safe mode (true,false,'strict'), profiles withonDisallowed, static mode, soft breaks, smart typography, symbols, source lines and file includes confined toincludeRoot. - Named presets (
default,comment,trusted, plus your own) and extensions (table of contents, heading permalinks, mentions, wikilinks, custom instances). - Optional render cache through CakePHP
Cache, keyed on the source, the effective options and the engine version. CarveHelperfor templates andCarveViewfor.crvtemplate files.CarveValidationas a validator provider: profile violations, lint findings with rule filters, and plain-text length limits.CarveBehaviorrenders a source field into HTML, plain-text and TOC fields on save.bin/cake carve render,convert,formatandlintcommands.
Full Changelog: https://github.com/markup-carve/cakephp-carve/commits/0.1.0