Code View

fson / vscode-ffsmd / extension / CHANGELOG.md
Preview
# Changelog — FFS-MD for VS Code

## 0.8.0 — Stop overriding base Markdown (front-matter fix)

Fix: installing the extension changed how normal Markdown was highlighted —
front-matter in particular looked worse than without the extension.

Cause: the injection's front-matter rule wrapped the whole `---` … `---`
block in its own scope, which suppressed the base Markdown tokens (and
VS Code's own YAML front-matter coloring) on those lines. An injection
grammar should only *add* scopes, never replace the base ones.

The front-matter rule is removed. VS Code already highlights front-matter
as YAML, so the extension no longer touches it. The injection now adds only
the FFS-specific tokens (directives, status marks, emoji, footnotes) on top
of Markdown and leaves everything else — headings, emphasis, lists, code,
front-matter — exactly as a plain Markdown file. Verified against the real
vscode-textmate engine: with the extension active, no base Markdown scope
changes anywhere in the corpus.

(The formatter still normalizes front-matter `key: value` spacing; that is
unchanged.)


## 0.7.0 — Uppercase ISO emoji flags and directive width color

Two highlighting fixes found on real content:

- **Uppercase ISO country-code shortcodes** like `:GB:`, `:US:`, `:DE:` were
  not highlighted — the emoji pattern only matched lowercase. It now matches
  `:[A-Za-z0-9_]+:`, so ISO flag codes light up alongside lowercase
  shortcodes. (Reference links like `[wt]:` and times like `12:30` are still
  not mistaken for emoji.)
- **The width field of a directive** (`25%`, `300px`) was colored as a plain
  path field instead of a number. The width pattern's trailing word-boundary
  never matched after `%`; it now recognizes the width and colors it
  `constant.numeric.directive.ffs`.


## 0.6.0 — Conservative formatter

Add a conservative, render-neutral FFS-MD formatter, exposed as the
"Format Document (FFS-MD)" command and as an opt-in Markdown document
formatter (setting `ffsmd.format.enable`, off by default).

FFS-MD has no canonical Markdown writer, so the formatter only normalizes
what is provably safe (verified against MdRenderer.cpp): FFS directive
fields (`[IMAGE:…]`/`[VIDEO: …]`/`[SVG: …]`/`[LIST:…]` trimmed to the
compact form the renderer itself parses), front-matter `key: value`
spacing, trailing whitespace, blank-line runs (3+ -> 2), and a single
final newline. It never touches fenced-code content, table rows, or any
Markdown structure (headings, list markers, emphasis, indentation,
wrapping).

Validation: `npm test` green — 18 formatter checks (directive trimming,
fenced-code safety, structure preservation) + corpus idempotency, plus the
existing grammar snapshot tests.

## 0.4.0 — Initial release

Injection-based highlighting for the FFS-MD dialect on top of VS Code's
built-in Markdown.

- Injection grammar (`text.html.markdown.ffs.injection`,
  `injectTo: text.html.markdown`) implementing the spec/ffsmd/TOKENS.md
  contract: top-of-file front-matter (keys, quoted strings, arrays,
  dates, booleans), the `[IMAGE:]`/`[VIDEO: ]`/`[SVG: ]`/`[LIST:]` block
  directives (exact prefixes; path/keyword/separator sub-scopes), status
  marks (exact literal set), `:emoji:` shortcodes, and footnote
  references/definitions.
- Second injection (`markdown.fson.codeblock`) that embeds `source.fson`
  inside ` ```fson ` fenced blocks, so FSON code in FFS-MD gets FSON
  colors when the `vscode-fson` extension is installed.
- Tests: inline scope assertions plus snapshot tests over the corpus
  (blog sample + the German UMTSM post with its `[IMAGE:…]` stress cases,
  and an `fson`-fence sample).

Scope: MD→FSON embedding remains out of scope; only fson→Markdown fenced
blocks are handled.