X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/bndl.org/blobdiff_plain/d29d6cb99e1596a4ebe45f70b157e9ea0b7c3461..b058a98dee1a45aec9bc0ff1aaf9890b32555c0f:/txt2pre?ds=sidebyside diff --git a/txt2pre b/txt2pre index 49bd164..1f04eb4 100644 --- a/txt2pre +++ b/txt2pre @@ -200,6 +200,7 @@ $title .= " — $author" if $title !~ /$author/; my ($upd, $pub, $url) = $txt =~ /(.*)\r?\n(.*)\r?\n(.*)\r?\n?\z/; ($upd) = $upd =~ /(?:updated|ویرایش): (.*)/ if $upd; ($pub) = $pub =~ /(?:published|انتشار): (.*)/ if $pub; +$upd = $pub if (!$upd); ($url) = $url =~ /(?:plain text|متن ساده): (.*)/ if $url; $url = 'https://bndl.org/bandali-cv.txt' if (!$url and $title =~ /curriculum vitae/); @@ -272,7 +273,7 @@ qq( $url_html $note_id $pub_rfc5322\n) -. ($updated ? $updated : '') . +. (($updated and $pub ne $upd) ? $updated : '') . qq() : ''; }