aboutsummaryrefslogtreecommitdiff
path: root/doc/todo/inline:_numerical_ordering_by_title.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-04-04 17:27:48 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-04-04 17:27:48 -0400
commit8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a (patch)
tree9e26465e0ca98a5f3cbc6c72a0cace4bf83b93db /doc/todo/inline:_numerical_ordering_by_title.mdwn
parent78a69e5bd632eb86ef8135e9c1d05d2c48b43362 (diff)
parent08fda4c9d374de1d3de3172a192d4d915d3dc0c1 (diff)
downloadikiwiki-8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a.tar
ikiwiki-8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a.tar.gz
Merge branch 'master'
Conflicts: doc/ikiwiki-makerepo.mdwn
Diffstat (limited to 'doc/todo/inline:_numerical_ordering_by_title.mdwn')
-rw-r--r--doc/todo/inline:_numerical_ordering_by_title.mdwn24
1 files changed, 13 insertions, 11 deletions
diff --git a/doc/todo/inline:_numerical_ordering_by_title.mdwn b/doc/todo/inline:_numerical_ordering_by_title.mdwn
index 95511d998..3d7424b3f 100644
--- a/doc/todo/inline:_numerical_ordering_by_title.mdwn
+++ b/doc/todo/inline:_numerical_ordering_by_title.mdwn
@@ -1,6 +1,8 @@
Could you please add numerical ordering by title to [[inline|plugins/inline]]
plugin? Now I can do only alphabetical order by title, but sometime it's not enough.
+> Implemented, see [[natural_sorting]] [[!tag done]] --[[Joey]]
+
BTW, it seems that ordering by title is rather ordering by filename of page.
For me "title" means title of page I can set using `title` parameter
of [[meta|plugins/meta]] plugin :)
@@ -155,11 +157,11 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
%config %links %pagestate %renderedfiles
%pagesources %destsources);
our $VERSION = 2.00; # plugin interface version, next is ikiwiki version
- @@ -835,6 +835,42 @@ sub titlepage ($) { #{{{
+ @@ -835,6 +835,42 @@ sub titlepage ($) {
return $title;
- } #}}}
+ }
- +sub titlecmp ($$) { #{{{
+ +sub titlecmp ($$) {
+ my $titleA=shift;
+ my $titleB=shift;
+
@@ -193,29 +195,29 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
+ return -1 if (@listB);
+
+ return 0;
- +} #}}}
+ +}
+
- sub linkpage ($) { #{{{
+ sub linkpage ($) {
my $link=shift;
my $chars = defined $config{wiki_file_chars} ? $config{wiki_file_chars} : "-[:alnum:]+/.:_";
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index 37752dd..ccaa399 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
- @@ -59,7 +59,7 @@ sub preprocess (@) { #{{{
+ @@ -59,7 +59,7 @@ sub preprocess (@) {
map {
"<li>$_</li>"
}
- sort @broken)
+ sort titlecmp @broken)
."</ul>\n";
- } # }}}
+ }
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 8efef3f..263e7a6 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
- @@ -192,7 +192,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -192,7 +192,7 @@ sub preprocess_inline (@) {
}
if (exists $params{sort} && $params{sort} eq 'title') {
@@ -228,20 +230,20 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
index b910758..10a1d87 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
- @@ -56,7 +56,7 @@ sub preprocess (@) { #{{{
+ @@ -56,7 +56,7 @@ sub preprocess (@) {
htmllink($params{page}, $params{destpage}, $_,
noimageinline => 1).
"</li>"
- } sort @orphans).
+ } sort titlecmp @orphans).
"</ul>\n";
- } # }}}
+ }
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index ceb7c84..00798e1 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
- @@ -89,7 +89,7 @@ sub genpage ($$) { #{{{
+ @@ -89,7 +89,7 @@ sub genpage ($$) {
$template->param(have_actions => 1);
}