mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-06 02:30:46 -08:00
* Revert "Temporarily disable a broken serializer test"
This reverts commit b3144300ee.
* restore synamic parameter parse result
* lint
* lint
* remove duplicate
* Update core/modules/parsers/parseutils.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update editions/test/tiddlers/tests/data/serialize/DynamicWidgetAttribute.tid
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update editions/test/tiddlers/tests/data/serialize/DynamicWidgetAttribute.tid
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: mixed qouted and unquoted
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
27 lines
647 B
JavaScript
27 lines
647 B
JavaScript
/*\
|
|
title: $:/plugins/tiddlywiki/wikitext-serialize/rules/macrocallblock.js
|
|
type: application/javascript
|
|
module-type: wikiruleserializer
|
|
\*/
|
|
|
|
"use strict";
|
|
|
|
exports.name = "macrocallblock";
|
|
|
|
exports.serialize = function (node) {
|
|
var result = "<<";
|
|
// Macro name
|
|
if(node.attributes && node.attributes["$variable"]) {
|
|
result += node.attributes["$variable"].value;
|
|
}
|
|
// Append ordered arguments if any
|
|
if(node.orderedAttributes) {
|
|
node.orderedAttributes.forEach(function (attribute) {
|
|
if(attribute.name !== "$variable") {
|
|
result += " " + $tw.utils.serializeAttribute(attribute);
|
|
}
|
|
});
|
|
}
|
|
result += ">>\n\n";
|
|
return result;
|
|
};
|