On Tue, 3 Apr 2012, Jeremy Ruston wrote:
OK, I've checked in some code:
https://github.com/Jermolene/TiddlyWiki5/commit/d13e2bacaf99c93f240390728054c78a77b8a49b
Let me know how it goes,
I feel like I'm being a bit thick or something, because I'm not sure
I get it.
First off you've got 'href' and 'target' as input parameters. But
then later when generating the Element node, the attribute 'href'
takes the value of 'linkInfo.target', whereas it seems quite likely
one might like to create a link which uses the HTML target attribute, in
which case linkInfo might need a thing for that.
Given that, what are the meaning of: target, space and href;
especially if one's starting point is foo@bar?
My intuition, but I don't see how the code would support this is
that target = 'foo', space='bar', and href would be constructed in
the linkMassager, which is a closure with the upvariable of the space
domain (perhaps 'tiddlyspace.com').
Secondly, I'm not sure how to move forward with the change. You have
installed a default linkMassager in js/App.js.
Presumably in my code[1] when creating the store, a different
linkMassager would be registered. That one would need to:
* duplicate the "linkInfo.target = encodeURIComponent(linkInfo.target);"
in js/App.js, for the sake of correct tiddlywiki-style links
* add code which did something like this:
if (linkInfo.space) {
linkInfo.target = 'http://'
+ linkInf.space
+ '.' + theEnclosedSpaceDomain
+ '/' + encodeURIComponent(linkInfo.target);
}
Is this what you were thinking, or something else?
Thanks.
[1] https://github.com/cdent/tw5ikifier/blob/master/Wikifier.js
--
Chris Dent http://burningchrome.com/
[...]
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.