microlog appends .n to dates when multiple entries for the same date

This commit is contained in:
2026-04-25 09:40:55 +01:00
parent 69a1ffb7b9
commit ec7a9d3419
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -23,11 +23,11 @@ read_log_to_tmp()
CURRENT_POST_FILENAME=""
while read line; do
if [[ -z "$CURRENT_POST_FILENAME" ]]; then
if [[ "$line" =~ (\#+)\ *([0-9]{4}-[0-9]{2}-[0-9]{2})\ * ]]; then
if [[ "$line" =~ (\#+)\ *([0-9]{4}-[0-9]{2}-[0-9]{2})(\.[0-9]+)?\ * ]]; then
CURRENT_POST_HEADING="${BASH_REMATCH[1]}"
DATE="${BASH_REMATCH[2]}"
CURRENT_POST_FILENAME="$(new_filename $DATE)"
elif [[ "$line" =~ \=\>\ +([^\ ]+)\ +([0-9]{4}-[0-9]{2}-[0-9]{2})\ +(.*) ]]; then
elif [[ "$line" =~ \=\>\ +([^\ ]+)\ +([0-9]{4}-[0-9]{2}-[0-9]{2})(\.[0-9]+)?\ +(.*) ]]; then
HREF="${BASH_REMATCH[1]}"
DATE="${BASH_REMATCH[2]}"
NAME="${BASH_REMATCH[3]}"