diff --git a/tw2/plugins/stripcomments.js b/tw2/plugins/stripcomments.js new file mode 100644 index 000000000..f8a445e60 --- /dev/null +++ b/tw2/plugins/stripcomments.js @@ -0,0 +1,27 @@ +/*\ +title: $:/plugins/stripcomments.js +type: application/javascript +module-type: tiddlerserializer + +Special serializer for cooking old versions of TiddlyWiki. It removes JavaScript comments formatted as `//#` + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports["text/plain-strip-comments"] = function(tiddler) { + var lines =tiddler.fields.text.split("\n"), + out = []; + for(var line=0; line -<> +<>