Hi all. I have updated my plugin to impliment "alphanumeric" tokenized 
sorting of the JSON keys whenever a refresh event happens.

The Alphanum Algorithm is discussed at http://www.DaveKoelle.com and there 
is a reference tiddler in my plugin from his site.

As an example, previously these keys would sort in this order:

"colors[0].color": "black",
"colors[1].color": "white",
"colors[10].color": "octarine",
"colors[2].color": "red",
"colors[3].color": "blue"

And now they sort in this order:

"colors[0].color": "black",
"colors[1].color": "white",
"colors[2].color": "red",
"colors[3].color": "blue",
"colors[10].color": "octarine"



Still thinking about other functionality to add...

---------------------
As an aside, the base sorting Filter Operators also choke when it comes to 
numbers embedded in strings ("path" style strings with numerals).

Would this be worth implementing in a new "alphanum[] / alphanumcs[]" pair 
of Filter Operators?

For example, right now both the sort[] and nsort[] operators return the 
same ("incorrect" to humans) result from this $list of tiddler titles:

Test/0/test0
Test/0/test1
Test/0/test10
Test/0/test2
Test/1/test0
Test/1/test1
Test/1/test10
Test/1/test2
Test/10/test1
Test/2/test1

---------------------

Best,
Joshua Fontany

-- 
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/a51f56f2-45a7-40ce-bd3f-08e4fbd498a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to