Package: nanoblogger Version: 3.2.3-3 Severity: normal Tags: patch 1) The last line of February's calendar has only two entries: 27 and 28 (with cal -m, without -m there are 26-28). I was surprised to see that they were right aligned in the table - i.e. attributed to the wrong day.
calendar.sh outputs an emtpy table cell (<td style="text-align: center;"></td>) for each "missing" day in cal's output, but it does this _always_ at the beginning of the table row. That's fine for the first row (starting with empty cells, then the cells with the days) but it's wrong for the last row where it should be the other why wrong. In my patch I refined the check and added a second one after the days. (I'm a little surprised because this problem seems new and I'm not really sure where it comes from.) 2) cal outputs empty lines sometimes which are turned into empty table rows by calender.sh. In my patch I changed the grep pattern for NUM_DAY_LINES so that only lines with numbers are counted. I hope you understand what I'm talking about and can make use of my patch ;-) Regards, gregor -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15.20060108 Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15) -- no debconf information
--- calendar.sh.orig 2005-06-03 04:36:04.000000000 +0200 +++ calendar.sh 2006-02-06 00:23:46.000000000 +0100 @@ -19,3 +19,3 @@ DAYS=`echo "$CALENDAR" |sed 1,2d` -NUM_DAY_LINES=`echo "$DAYS" |grep -n "." |cut -c1` +NUM_DAY_LINES=`echo "$DAYS" |grep -n "[0-9]" |cut -c1` @@ -36,3 +36,3 @@ echo '<tr>' >> "$PLUGIN_OUTFILE" - echo "$DN_LINES" | sed -e '/ [ \t]/ s//<td style="text-align: center;"><\/td>\ /g; /[0-9]/ s///g' >> "$PLUGIN_OUTFILE" + echo "$DN_LINES" | sed -e '/ $/ Q; / [ \t]/ s//<td style="text-align: center;"><\/td>\ /g; /[0-9]/ s///g' >> "$PLUGIN_OUTFILE" for dn in $DN_LINES ; do @@ -58,2 +58,3 @@ done + echo "$DN_LINES" | sed -e '/^ / Q; / [ \t]/ s//<td style="text-align: center;"><\/td>\ /g; /[0-9]/ s///g' >> "$PLUGIN_OUTFILE" echo '</tr>' >> "$PLUGIN_OUTFILE"