xif-fr / dokuwiki-plugin-catlist

DokuWiki plugin to list pages and namespaces recursively in nested lists
https://www.dokuwiki.org/plugin:catlist
8 stars 15 forks source link

sortByTitle problems with headlines starting with a digit [0-9] #29

Closed hurzilein closed 5 years ago

hurzilein commented 5 years ago

30

Hi

if u have for example 4 pages with the following titles (the first <h1>)

1st page title: 1. some text 2nd page title: 2. some text 3rd page title: 11. some text 4th page title: 4. some text

the result after sorting is

replacing $b = strcmp($a_title, $b_title); with
$b = strnatcasecmp($a_title, $b_title); in syntax.php Line 344 will do it but not tested for any side effects

br

xif-fr commented 5 years ago

Thanks for the improvement. As the sorting feature was added very recently, I don't take much risk switching for strnatcasecmp.

xif-fr commented 5 years ago

Fixed by commit 0be92ea132dd11aa50941dd73d93d0fb8f9cb68c New version soon