From 581381e335f2adc83d980c6805e1e51a936fba45 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 7 Aug 2008 15:47:59 -0400 Subject: [PATCH] inline: Ignore parent dirs when sorting pages by title. --- IkiWiki/Plugin/inline.pm | 2 +- debian/changelog | 3 +++ doc/bugs/inline_sort-by-title_issues.mdwn | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 9c336e7d7..1a6c7cfcd 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -186,7 +186,7 @@ sub preprocess_inline (@) { #{{{ } if (exists $params{sort} && $params{sort} eq 'title') { - @list=sort @list; + @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list; } elsif (exists $params{sort} && $params{sort} eq 'mtime') { @list=sort { $pagemtime{$b} <=> $pagemtime{$a} } @list; diff --git a/debian/changelog b/debian/changelog index a7d27fd84..b98b57491 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,9 @@ ikiwiki (2.60) UNRELEASED; urgency=low [ Josh Triplett ] * Add Suggests on texlive and texlive-science for the teximg plugin + [ Joey Hess ] + * inline: Ignore parent dirs when sorting pages by title. + -- Josh Triplett Wed, 06 Aug 2008 20:56:06 -0700 ikiwiki (2.56) unstable; urgency=low diff --git a/doc/bugs/inline_sort-by-title_issues.mdwn b/doc/bugs/inline_sort-by-title_issues.mdwn index bbb079f89..884846b32 100644 --- a/doc/bugs/inline_sort-by-title_issues.mdwn +++ b/doc/bugs/inline_sort-by-title_issues.mdwn @@ -51,3 +51,7 @@ And here is a [[patch]] for this. It makes `sort=title` actually sort on the ti * `reverse` - If set to "yes", causes the sort order to be reversed. * `feedshow` - Specify the maximum number of matching pages to include in the rss/atom feeds. The default is the same as the `show` value above. + +> Thanks for the patch. [[done]], but I left off the sort=path. Also left +> off the lc (if you ask your locale to sort case-sensatively, it should, I +> think). --[[Joey]] -- 2.26.2