tiddlywiki
Version:
a non-linear personal web notebook
16 lines (12 loc) • 387 B
JavaScript
/*\
title: $:/plugins/tiddlywiki/wikitext-serialize/rules/prettyextlink.js
type: application/javascript
module-type: wikiruleserializer
\*/
;
exports.name = "prettyextlink";
exports.serialize = function(tree,serialize) {
var tooltip = tree.children[0].text;
var url = tree.attributes.href.value;
return "[ext[" + (tooltip !== url ? tooltip + "|" : "") + url + "]]";
};