(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

exports.name = "myrule";
exports.types = {block: true};

exports.init = function(parser) {
   this.parser = parser;
   // Regexp to match
   this.matchRegExp = /-{3,}\r?(?:\n|$)/mg;
};

exports.parse = function() {
   // Move past the match
   this.parser.pos = this.matchRegExp.lastIndex;
   return [{type: "element", tag: "hr"}];
};

})();

this is the code of horiz rule of TW parser

I am using it to try to learn.

anyway when you enter --- it substitute that with hr but not in the 
original tiddler

how can i modify the code so that the actual --- is replaced by hr in the 
tiddler??

thank you 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6ff41dfb-2645-4a7e-9e45-25fdb3d7e5b5%40googlegroups.com.

Reply via email to