Hello Stephan.
I'm not very fan of the regular expressions. They are hard to read, they
are hard to write and you can get unexpected behaviors. I want to keep the
syntax simple. That way any user can write their own entries.
Anyway. Could you explain your idea a bit more? What are the advantages of
your idea? I don't understand at all what this does:
"alt+t" : [ { search:/^/gm, replace:"|" }, { search:/ +/g, replace:"|" }, {
search:/$/gm, replace:"|" } ]
Regards
El domingo, 20 de abril de 2014 12:26:40 UTC+2, Stephan Hradek escribió:
>
> Why not make this regular expression aware? Yes… I'm a regular expression
> junkie…
>
> Instead of specifying pre and post make:
>
> "alt+t" : [ { search: /^| +|$/gm, replace:"|" } ],
> "ctrl+o" : [ { search: /^ */gm, replace:"# " } ],
>
> Why did I specify an array? That way you can specify more than one search
> and replace pattern for each keypress. All the search and replaces should
> be executed one after the other.
>
> The alt+t could alternatively be specified like this:
>
> "alt+t" : [ { search:/^/gm, replace:"|" }, { search:/ +/g, replace:"|" },
> { search:/$/gm, replace:"|" } ]
>
>
>
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.