1
0
Fork 0

Pre-formatted block (blockquote) in msgfmt

This has existed for a while; must have forgotten to commit
master
Mike Gerwitz 2014-11-30 16:31:57 -05:00
parent 2ff9b89452
commit 61804d8e1d
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 3 additions and 0 deletions

3
msgfmt
View File

@ -98,6 +98,9 @@ awk -vid="$id" -vurl_root="${url_root%/}" -vcref_errlog="$cref_errlog" '
# paragraph, unless that paragraph is also indented) # paragraph, unless that paragraph is also indented)
s#\n\n \+\(\([^\n]\+\n\(\n \+\)\?\)\+\)#<blockquote>\1</blockquote>#g s#\n\n \+\(\([^\n]\+\n\(\n \+\)\?\)\+\)#<blockquote>\1</blockquote>#g
# pre-formatted block. markdown-style
s#\n\n \+\(\([^\n]\+\n\(\n \+\)\?\)\+\)#<blockquote>\1</blockquote>#g
# unfortunately, non-greedy matches make it difficult to exclude punctuation # unfortunately, non-greedy matches make it difficult to exclude punctuation
# at the end of a link, so we will handle it in a separate expression # at the end of a link, so we will handle it in a separate expression
s#[fh]ttps\?://[^]\n )]\+#<a href="&">&</a>#g; s#[fh]ttps\?://[^]\n )]\+#<a href="&">&</a>#g;