mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-11 17:21:56 -07:00
* fix: apply automatic eslint fixes * lint: allow hashbang comment for tiddlywiki.js * lint: first back of manual lint fixes for unused vars * lint: added more fixes for unused vars * lint: missed files * lint: updated eslint config with selected rules from #9669
17 lines
379 B
JavaScript
17 lines
379 B
JavaScript
/*\
|
|
title: $:/plugins/tiddlywiki/wikitext-serialize/rules/extlink.js
|
|
type: application/javascript
|
|
module-type: wikiruleserializer
|
|
\*/
|
|
|
|
"use strict";
|
|
|
|
exports.name = "extlink";
|
|
|
|
exports.serialize = function(tree,serialize) {
|
|
if(tree.type === "text") {
|
|
return "~" + tree.text;
|
|
} else if(tree.type === "element" && tree.tag === "a") {
|
|
return tree.attributes.href.value;
|
|
}
|
|
};
|