Hi TheDiveO
The parse tree format for widgets changed around 5.0.9. Now you'll need
something like this:
return [{
type: "macrocall",
name: "RfcLink",
params: [ { name: "rfcnumber", value: this.match[1] }, { name: "format",
value: format } ] }];
Note that any child parse tree nodes of a macrocall widget are ignored.
Best wishes
Jeremy.
On Wed, Jul 30, 2014 at 10:19 AM, BJ <[email protected]> wrote:
>
>
> On Wednesday, July 30, 2014 10:09:21 AM UTC+2, TheDiveO wrote:
>>
>> I'm in the process of migrating a TW5.0.7-based TW to 5.0.13. One of the
>> modules that I'm migrating is a wiki parser rule. In it, I need to return
>> content that represents a macro call. So far, I did this:
>>
>> return [{
>> type: "element",
>> tag: "$macrocall",
>> attributes: {
>> "$name": { type: "string", value: "RfcLink" },
>> rfcnumber: { type: "string", value: this.match[1] },
>> format: { type: "string", value: format }
>> },
>> children: [
>> { type: "text", text: linkText }
>> ]
>> }];
>>
>>
>> With 5.0.13 I get an exception that some string (which one?!) contains
>> illegal characters. My suspicion is that someone chokes on $macrocall here.
>> However, I need to return content that gets parsed again. So I'm seeming to
>> do something wrong here. Can please someone of the TW5 professionals shed
>> some light on this and how to correctly fix this?
>>
>> Thanks!
>> -- TheDiveO
>>
>> It seems more likely that there is a problem with "$name"
> If you run your code in chome and look in the javascript console, you may
> be able to find out where the exception is occuring
>
> Best of luck
>
> BJ
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWikiDev" 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/tiddlywikidev.
> For more options, visit https://groups.google.com/d/optout.
>
--
Jeremy Ruston
mailto:[email protected]
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.