diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8258.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8258.tid new file mode 100644 index 000000000..14f282c9a --- /dev/null +++ b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#8258.tid @@ -0,0 +1,36 @@ +title: $:/changenotes/5.4.0/#8258 +description: Add ability to serialize WikiText AST nodes back to wikitext strings +tags: $:/tags/ChangeNote +change-type: feature +change-category: developer +links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8258 +github-contributors: linonetwo + +This PR introduces a new utility `$tw.utils.serializeWikitextParseTree()` that can convert WikiText Abstract Syntax Tree (AST) nodes back into wikitext strings. + +There is also a utility `serializeAttribute` for a single attribute node, like an attribute of a widget. + +!! Use Cases + +* Programmatically manipulating wikitext content by modifying the AST, and use this to write it back +* Building WYSIWYG editors +* Creating wikitext formatters and linters + +!! Implementation + +* New core plugin `tiddlywiki/wikitext-serialize` containing most of the logic +* Separate serialize handlers for each WikiText rule as `module-type: wikiruleserializer` +* Test suite with tag `$:/tags/wikitext-serialize-test-spec` +* It uses each parser's name as rule (`nextMatch.rule.name`), each AST node that needs serialization has a `type` property matching the rule name + +!! Example Usage + +```javascript +// Parse a tiddler's wikitext to AST +var parseTree = $tw.wiki.parseTiddler("MyTiddler").tree; + +// Serialize AST back to wikitext string +var wikitextString = $tw.utils.serializeWikitextParseTree(parseTree).trimEnd(); +``` + +This feature offers new tools for JS plugin developers. It is not a user-facing change. diff --git a/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9078.tid b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9078.tid new file mode 100644 index 000000000..de0fe92c0 --- /dev/null +++ b/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9078.tid @@ -0,0 +1,15 @@ +title: $:/changenotes/5.4.0/#9078 +description: Web server get-file route now supports HTTP Range headers and streaming +tags: $:/tags/ChangeNote +change-type: enhancement +change-category: nodejs +links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9078 +github-contributors: linonetwo + +The web server's `get-file` route now supports HTTP Range requests and file streaming, enabling better loading and playback of large media files. + +!! Features + +* HTTP Range header: Enables partial content delivery with `206 Partial Content` responses, which is used when the user drags the progress bar in video/audio playback +* Streaming file delivery: Browsers can now properly seek and stream video files from the `/files/` directory. Files are read using Node.js streams for better performance and memory efficiency. +* Resumable downloads: To save interrupted downloads