Hello,

I traced down the code and the problem is on the JSON.parse part.
After the substituteVariableReferences execution, JSON.parse will receive 
the following string:

 "{"text":"Now↵Try 
↵LB","bag":"default","revision":"0","type":"text/vnd.tiddlywiki","title"

Which does not seems to be a valid JSON string.
The code that fails is like this

// Make the clone of the template
 var make = this.wiki.getTiddlerAsJson(this.maketidTemplate);
 debugger;
 var tempTest =this.substituteVariableReferences(make);
 var makeClone = JSON.parse(tempTest);

The problem is that substituteVariableReferences returns that string with 
those unexpected characters. Maybe the substituteVariableReferences should 
return \n instead?

El martes, 4 de noviembre de 2014 12:38:07 UTC+1, Jeremy Ruston escribió:
>
> Hi Danielo
>
> There's no problem that I can see with the snippet you posted above. Can 
> you put up a minimal test case?
>
> Best wishes
>
> Jeremy
>
>
> On Tue, Nov 4, 2014 at 11:27 AM, Danielo Rodríguez <[email protected] 
> <javascript:>> wrote:
>
>> The error is much more concise in firefox:
>>
>> SyntaxError: JSON.parse: bad control character in string literal at line 
>> 1 column 13 of the JSON data
>>
>> Why?
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/tiddlywiki.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Jeremy Ruston
> mailto:[email protected] <javascript:>
>  

-- 
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.

Reply via email to