Mercurial > hg > chronicle
changeset 179:9605ec6f91af
Don't care if there is whitespace after 'Title:', etc, in the
entries.
author | Steve Kemp <steve@steve.org.uk> |
---|---|
date | Tue, 01 Apr 2008 22:18:31 +0100 |
parents | 2353a39f57e6 |
children | 10d93b5e1332 |
files | bin/chronicle |
diffstat | 1 files changed, 5 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/chronicle Tue Apr 01 22:16:25 2008 +0100 +++ b/bin/chronicle Tue Apr 01 22:18:31 2008 +0100 @@ -1476,37 +1476,31 @@ # # Get the tags. # - if ( ( $line =~ /^tags: (.*)/i ) && !length($tags) ) + if ( ( $line =~ /^tags:(.*)/i ) && !length($tags) ) { $tags = $1; } - elsif ( ( $line =~ /^title: (.*)/i ) && !length($title) ) + elsif ( ( $line =~ /^title:(.*)/i ) && !length($title) ) { # - # Get the title + # Get the title, strip leading and trailing space. # $title = $1; - - # strip leading and trailing space. $title =~ s/^\s+// if ( length $title ); $title =~ s/\s+$// if ( length $title ); } - elsif ( ( $line =~ /^date: (.*)/i ) && !length($date) ) + elsif ( ( $line =~ /^date:(.*)/i ) && !length($date) ) { - # - # Get the date. + # Get the date, strip leading and trailing space. # $date = $1; - - # strip leading and trailing space. $date =~ s/^\s+// if ( length $date ); $date =~ s/\s+$// if ( length $date ); } else { - # # Just a piece of body text. #