# Changelog All notable changes to the Spintax syntax highlighting package are documented here. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased ### Changed - Pushing a version tag now publishes the GitHub Release automatically, with notes taken from this file's matching section; a tag with no section fails the job instead of publishing an empty release. The three newest releases are kept and older entries removed — tags are never deleted, since Package Control resolves installable versions from them. - CI uses `actions/checkout@v5`; v4 targets the deprecated Node.js 20. ## 1.2.0 — 2026-07-20 ### Changed - The syntax no longer claims the `.gtw` extension; it applies to `.spintax` only. `.gtw` belongs to Generating The Web — the 2009 application this syntax was originally based on — and is a container format rather than raw template text, so highlighting it as spintax was wrong. The Modern Spintax Engine has its own standard, and `.spintax` is its canonical extension. - README drops the remaining GTW wording and names the Modern Spintax Engine (`@spintax/core`) as the contract the grammar mirrors. ### Fixed - README rendered incorrectly on packagecontrol.io: the construct table was cut off at the first `|` inside each example (escaped pipes are not honoured there), and the `spintax` code fence raised *language not supported*. The table is now a list and the fence is untagged, so every example shows in full. ### Documentation - Document the empty enumeration option (`{|a|b}`) and the bare permutation form (`[a|b|c]`) alongside the configured one. ## 1.1.1 — 2026-07-19 ### Fixed - `.gitattributes` now marks development files `export-ignore`, so the installed package contains only what Sublime loads: the syntax, the comment preferences, README, CHANGELOG and LICENSE. Tests and CI config previously shipped to users. ## 1.1.0 — 2026-07-19 ### Added - Highlighting for the `#def` directive, shipped in Spintax engine 3.0.0 / `@spintax/core` 0.3.0. Same line-anchored shape as `#set` (`#def %name% = value`), opposite semantics: `#set` is a macro whose value is re-substituted and re-rolled at every reference, while `#def` resolves once per render and holds that result everywhere. - `#def` gets its own scope, `keyword.other.directive.def.spintax`, rather than sharing `#set`'s. The directives mean genuinely different things, so a colour scheme must be able to tell them apart. ### Fixed - Directives on their own line inside a multi-line `{ … }` or `[ … ]` are now highlighted. The engine extracts `#set`/`#def` from the whole source line-by-line, independent of bracket nesting, so such a line really does define a variable — it was previously rendered as plain enumeration text. Pre-existing for `#set`; fixed for both. ### Changed - Tests are now Sublime Text syntax test files (`tests/syntax_test_spintax.spintax`) run by the official [`SublimeText/syntax-test-action`](https://github.com/SublimeText/syntax-test-action), replacing the previous Python validation script. CI exercises the grammar on Sublime Text `latest`, `stable`, and an ST3 build, confirming ST3092+ compatibility. ## 1.0.0 — 2026-07-08 First release. Engine-accurate highlighting for the full spintax surface, matching the [`@spintax/core`](https://www.npmjs.com/package/@spintax/core) contract. ### Added - Enumerations `{a|b|c}`, permutations `[a|b]`, variables `%name%`, `#set` / `#include` directives, comments `/# … #/`. - **Conditionals** `{?VAR?then|else}` / `{?!VAR?…}` — strict opener (ASCII identifier + mandatory `?`), so `{??x}` / `{?1bad?x}` are not mistaken for conditionals. - **Plurals** `{plural N: form|…}` — requires the `{plural ` prefix and a mandatory `:`, so `{plural noun}` / `{plural: x}` are not mistaken for plurals. - **Engine-accurate permutation separators**: leading `` is recognised only as a known-key block or a single-separator, and HTML (`[
  • a
  • |b]`, `[|b]`) is left as content. Leading `` (no matching close tag) and per-element trailing separators (`[a<, >|b]`, `[a|b]`) are highlighted as separators — mirroring the engine's `looksLikeHtmlStartTag` / `extractTrailingSep` asymmetry. - Block-comment toggle (`/# … #/`) via `Comments.tmPreferences`.