> I have a 2.5.2 tw with sectionlinks 1.2.2 running under firefox 3.5.1
> on windows XP.
> The links sometimes jump to the wrong section header.

> Maybe the call to e.contains is matching the trailing string rather
> than matching the exact string?

> I claim this is a bug. If it's a feature then I totally missed the
> documention of said feature 8-).

Actually, it's an unintended a side-effect of using a simple 'indexOf
()' comparison to find the matching header text, which worked just
fine as long as there was a *unique* substring match for each header.
However, as you've noted, if there are both an exact and a substring
match, then first matching header in the tiddler would be used, even
if it was not the exact match.

To address this, I've updated the plugin logic to try *three*
different kinds of criteria for finding the correct header:
   1) exact match
   2) starts with
   3) contains

Also note that, when matching header text, any leading/trailing
whitespace in that text is ignored when comparing to the 'target'
section name.  Thus,
! Foobar
   and
!Foobar
are considered to be identical headers, and both will match a section
link to [[here##Foobar]] (which results in the first of the two
headers being used).

Get the update (v1.3.0) here:
   http://www.TiddlyTools.com/#SectionLinksPlugin

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to