Skip to content

Releases: ralsina/shortcodes

v0.5.0

Choose a tag to compare

@ralsina ralsina released this 02 Sep 15:56

What changed

parse() no longer returns sc_result by value: the caller provides the struct and parse() fills it in.

The old by-value return of this ~160KB struct made LLVM explode the inlined copies into a 166,188-instruction function, costing downstream projects many extra minutes on every --release build (nicolino: 29s debug vs 18.4 min release). With the new ABI, a minimal consumer's release build went from >9 minutes (aborted) to 6.7 seconds.

⚠️ Breaking — C ABI only

The Crystal API is unchanged:

require "shortcodes"
Shortcodes.parse("some {% foo %}text{% end %}") # same as before

C consumers who vendor shortcodes.c/shortcodes.h must adapt their call sites:

sc_result result;
parse(input, len, &result);

parse() now zeroes the result itself, which also makes the escaped and self_closing fields deterministic — they were previously only written when their parsing actions fired and read as whatever was on the stack.

📚 Documentation

New docs/compile-time-pitfall.md: the full case study — symptoms, profiling trail, IR before/after, the fix, a second pitfall (zero-initializing huge lib structs Crystal-side is also pathological for LLVM), pre/post timings, and guidance for shard authors.

Full Changelog: v0.4.1...v0.5.0

v0.4.1

Choose a tag to compare

@ralsina ralsina released this 30 Aug 17:01

Changelog

All notable changes to this project will be documented in this file.

[0.4.1] - 2026-08-30

v0.4.0

Choose a tag to compare

@ralsina ralsina released this 30 Aug 16:04

Changelog

All notable changes to this project will be documented in this file.

[0.4.0] - 2026-08-30

v0.3.0

Choose a tag to compare

@ralsina ralsina released this 30 Aug 15:16

🚀 Features

  • Support unquoted argument values with unambiguous punctuation

Unquoted values now accept alphanumerics plus - _ . / : @ + ~ # in any position, so path=docs/v2_1, src=photo-1.png or url=https://example.com/page#anchor work without quotes.

Values must start and end with a non-slash character so a trailing slash can never bleed into the self-closing delimiters; ambiguous values are rejected rather than misparsed.

🐛 Bug fixes

  • Positional arguments no longer leave their name slot as uninitialized stack memory, which could surface as garbage argument names in long-running processes.

v0.2.2

Choose a tag to compare

@ralsina ralsina released this 08 Oct 19:56

Finish proper handling of escaped arg values

v0.2.1

Choose a tag to compare

@ralsina ralsina released this 07 Oct 19:35

Add some support for escaped quotes in strings

v0.2.0 first stable release

Choose a tag to compare

@ralsina ralsina released this 23 Jul 12:13

Initial release. Feature complete as far as I need it.