Update #9722.tid

This commit is contained in:
lin onetwo 2026-03-11 20:29:27 +08:00 committed by GitHub
parent 62e6fd3a6a
commit b3c2fe4244
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
title: $:/changenotes/5.5.0/#9722
description: Filter serialization: CST quote-style preservation and formatting options
description: Filter serialization
tags: $:/tags/ChangeNote
release: 5.5.0
change-type: enhancement
@ -7,13 +7,4 @@ change-category: developer
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9722
github-contributors: linonetwo
Extends the filter serialization work introduced in v5.4.0 with two improvements:
* ''CST round-trip for shorthand title syntax'': The filter parser now preserves a `titleQuote` property (`"double"`, `"single"`, or `"none"`) on operators produced by shorthand title syntax (`"My Title"`, `'My Title'`, `MyTitle`). The serializer uses this metadata so that `$tw.utils.serializeFilterParseTree()` faithfully reproduces the original quoting style instead of normalising everything to `[title[...]]`.
* ''Formatting options'': `serializeFilterParseTree(tree, options)` now accepts:
** `maxRunsPerLine` — insert a newline + indent after every N filter runs
** `wrapAt` — wrap at approximately a given column width
** `indent` — the indentation string used when wrapping (default `" "`)
These options lay the groundwork for a future WikiText linter and formatter.
Allow filter AST serialization and inline MVV filter syntax serialization.