Mohammad

I so wish I could help you solve this problem. Its a barrier to decent 
"replace" in TW.

This issue may need Jeremy's input?

One thing IS clear to me. TW protects itself from eating itself. This may 
be part of the issue?

Best wishes
Josiah

On Tuesday, 5 March 2019 06:13:03 UTC+1, Mohammad wrote:
>
> If in a browser console (FF and Chrome, press F12 and see the console) 
> enter the below JavaScript code, it will work
>
> a= "One"
> b="Two"
> s="\n"
> y=a + s +b
>
> then you get
>  
> a="One"
> "One"
> b="Two"
> "Two"
> s="\n"
> "
> "
> a+s+b
> "One
> Two"
>
>
> Note the two lines text in the output. That means the "\n" treated as a 
> *line-break 
> or newline*.
>
> Now, do the same in Tiddlywiki.
>
> Create a JS macro as below:
>
> (function(){/*jslint node: true, browser: true *//*global $tw: false */"use 
> strict";
> exports.name = "jsmac";
>
> exports.params = [
>     {name: "a"},
>     {name: "b"},
>     {name: "s"} 
> ];
> /*
> Run the macro
> */
> exports.run = function(a, b, s) {
>
>     return a + s + b;
> }
> })();
>
>
>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/54d15fcb-626c-4251-80bf-b083de9163b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to