On Aug 8, 2:25 pm, rouilj <rou...@cs.umb.edu> wrote:
> For use in <<tiddler TiddlerName##section title>> I guess the same algorithm 
> could be used, but I am not sure how useful it would be for
> named anchors as I am not sure what happens:
>
>    <html><a name="texthere"></html>when an named anchor tag encompasses 
> text<html></a></html>.
>
> Is that an addressable item in jQuery? If so and I can do a jQuery('a 
> [name="texthere"]').text() or
> some such then it could replace the functionality of the PartTiddlerPlugin.

Well I did a little testing and I think I discovered a bug. According
to:

 http://www.w3.org/TR/html4/struct/links.html#h-12.2.3

<<<
Suppose we define an anchor named "anchor-one" in the file "one.html".

...text before the anchor...
<A name="anchor-one">This is the location of anchor one.</A>
...text after the anchor...

This creates an anchor around the text "This is the location of anchor
one.". Usually, the contents of A are not rendered in any special way
when A defines an anchor only.
<<<

so it looks like:

    <html><a name="texthere"></html>when an named anchor tag
encompasses text<html></a></html>.

should work except when I typed this into tiddlywiki and looked at it
with FireFox 3.6.8 and Firebug 1.5.4, I saw the following structure:

  <span><a name="texthere"></a></span>when an named anchor tag
encompasses text....

huh, where did the </a> come from? Running
jQuery("a[name='texthere']]").text() in the firbug console returned no
text which given the rendered
code looks right. Changing the tiddler text to:

    <html><a name="texthere">foo bar</html>when an named anchor tag
encompasses text<html></a></html>.

resulted in "foo bar" being rendered *as a link* and when hovered over
it showed "javascript:" as the href. However using
 jQuery("a[name='texthere']]").text() did return the expected "foo
bar" which was great for using <a> to replace the
PartTiddlerPlugin, but the rendering of "foo bar" as a link was
unexpected (and I think incorrect). Also I would argue
that adding the </a> seemingly automatically by </html> is also wrong,
but I could see that being 'corrected' by the
browser as a result of the </span>, so I am not sure quite where that
malfunction occurs.

-- rouilj

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlyw...@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to