Mercurial > hg > chronicle
changeset 162:067a92d602a0
Sort all tags on each entry.
author | Steve Kemp <steve@steve.org.uk> |
---|---|
date | Wed, 16 Jan 2008 15:36:06 +0000 |
parents | 9a1d4fb47b44 |
children | f7e357e8bae5 |
files | bin/chronicle |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/chronicle Sun Jan 06 01:04:23 2008 +0000 +++ b/bin/chronicle Wed Jan 16 15:36:06 2008 +0000 @@ -1415,6 +1415,7 @@ # If we have tags then we should use them. # my $entryTags; + my @tmpTags; foreach my $tag ( split( /,/, $tags ) ) { @@ -1427,10 +1428,21 @@ # tags are lowercase. $tag = lc($tag); - push ( @$entryTags, { tag => $tag } ); + + # store the tag away - so we can have a sorted list later. + push( @tmpTags, $tag ); } # + # Push the sorted tags into the entry + # + foreach my $t ( sort @tmpTags ) + { + push ( @$entryTags, { tag => $t } ); + } + + + # # If the date isn't set then use todays. # if ( ! defined($date) ||( !length( $date ) ) )