v0.3.0 - hardened, conformance-backed, dual-language
A hardening release driven by a multi-agent review of the format, both parsers, the conformance suite, the docs, and real-world dogfooding.
Parser correctness (Swift and TypeScript, in lockstep, pinned by shared conformance vectors)
- Directives are code-block-aware:
@planeis a directive only at column 0 and never inside a fenced (``` /~~~) or indented code block. You can now document 3md in 3md. - Quoted values escape and unescape
\\and\", so titles/labels/attributes with quotes and backslashes round-trip exactly. An unterminated quote is now an error. z,x, andymust be finite decimals; hex,inf, andnanare rejected. This also closes thez=nanduplicate-detection bypass.- A leading UTF-8 BOM is stripped.
Tooling and DX
threemd infonow prints x, y, and attributes; a path of-reads stdin; missing-file and non-UTF-8 give distinct errors.- HTML renderer uses
<pre><code>; serializer escaping aligned with the parser.
Project
LICENSE(MIT),js/README.md, and README sections for the CLI, the JavaScript/TypeScript package, and SwiftPM install.- Conformance suite grew to 36 shared vectors, run by both the Swift and TypeScript suites.
- SPEC.md now specifies the numeric grammar, escaping, code-block safety, and BOM handling.
Verified: swift-format lint clean, 53 Swift tests, 58 TypeScript tests, all 36 conformance vectors green in both languages, spec-sync 7/7.
SwiftPM:
.package(url: "https://github.com/CorvidLabs/3md", from: "0.3.0")TypeScript:
bun add @corvidlabs/threemd