file_size="$(stat -Lc %s "$file")"
file_date="$(stat -Lc %Y "$file")"
- http_date="$(date -uRd @$file_date)"
- http_date="${http_date%+0000}GMT"
+ http_date="$(date -ud "@$file_date" +"%a, %d %b %Y %T GMT")"
cachedate="$(
# Parse the allowable date formats from Section 3.3.1 of
# https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
} else if ( AllowHTML && match( block, /^ ? ? ?(<\/[A-Za-z][A-Za-z0-9-]*[[:space:]]*>|<[A-Za-z][A-Za-z0-9-]*([[:space:]]+[A-Za-z_:][A-Za-z0-9_\.:-]*([[:space:]]*=[[:space:]]*([[:space:]"'=<>`]+|"[^"]*"|'[^']*'))?)*[[:space:]]*\/?>)([[:space:]]*\n)([^\n]|\n[ \t]*[^\n])*(\n[[:space:]]*\n|$)/) ) {
len = RLENGTH; st = RSTART;
return substr(block, st, len) _block(substr(block, st + len));
-
- # Horizontal rule
- } else if ( match( block, /(^|\n) ? ? ?((\* *){3,}|(- *){3,}|(_ *){3,})($|\n)/) ) {
- len = RLENGTH; st = RSTART;
- return _block(substr(block, 1, st - 1)) "<hr />\n" _block(substr(block, st + len));
# Blockquote (leading >)
} else if ( match( block, /^> /) ) {
return "<h" hlvl " id=\"" hid " - " HTML(htxt) "\">" inline( htxt ) "</h" hlvl ">\n\n" \
_block( substr( block, len + 1) );
+ # Horizontal rule
+ } else if ( match( block, /(^|\n) ? ? ?((\* *){3,}|(- *){3,}|(_ *){3,})($|\n)/) ) {
+ len = RLENGTH; st = RSTART;
+ return _block(substr(block, 1, st - 1)) "<hr />\n" _block(substr(block, st + len));
+
# Plain paragraph
} else {
match( block, /(^|\n)[[:space:]]*(\n|$)/ ) || match( block, /$/ );