Hi SS

Well done, this is pretty interesting.

As a sidebar, I’ve thought about enabling anchors before, thinking that we’d 
need a new mechanism to enable us to suppress the usual navigation behaviour 
when the location hash changes (the bit after the # of the URL). You’ve 
actually found a bug in the processing of the location hash that disrupts that 
processing if the URL contains a second hash.

The problem is here where we split the location hash out of the full URL using 
.split(“#”):

https://github.com/Jermolene/TiddlyWiki5/blob/master/boot/boot.js#L270 
<https://github.com/Jermolene/TiddlyWiki5/blob/master/boot/boot.js#L270>

By splitting on the # character we actually throw away anything after a 2nd # 
character. So, when the URL contains two hashes, TW5 only sees up to and 
excluding the 2nd one…

That’s why changing the URL to a value that starts with # doesn’t trigger a 
navigation (i.e. an overall double hash, as you have them).

Another way to see the bug is to navigate to https://tiddlywiki 
<https://tiddlywiki/>.com/#foo#bar instead of navigating to a (missing) tiddler 
called “foo#bar” it just sees the tiddler title “foo”).

It’s an interesting question what to do now: this is definitely a bug, and it 
prevents navigating correctly to tiddlers whose titles contain # characters. 
But equally, as noted above, I’ve been wanting to introduce a mechanism not 
unlike this just to permit the anchor stuff you’re experimenting with.

Best wishes

Jeremy.




> On 1 Mar 2019, at 12:27, S. S. <sachdev.su...@gmail.com> wrote:
> 
> 
> It's best experienced - and the tiddler says it better than pasting it here.
> 
> Please drag the attached tiddler into https://tiddlywiki.com/ and import. 
> In the side bar, Click the the Recent tab, and open the tiddler.
> 
> Click the links at the top and within the tiddler, and then please read it 
> right to the very end to understand what is being shown.
> 
> Thanks.
> 
> 
> 
> -- 
> 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 tiddlywiki+unsubscr...@googlegroups.com 
> <mailto:tiddlywiki+unsubscr...@googlegroups.com>.
> To post to this group, send email to tiddlywiki@googlegroups.com 
> <mailto:tiddlywiki@googlegroups.com>.
> Visit this group at https://groups.google.com/group/tiddlywiki 
> <https://groups.google.com/group/tiddlywiki>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/52893c8d-3aa6-4318-923c-ca15237e7bf6%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/52893c8d-3aa6-4318-923c-ca15237e7bf6%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> <Section Names using ID for internal Links.tid>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/B79664C7-579D-43BA-82C8-EB9B186E4E7A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to