summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
04a1a7a)
Recognise common <url> notation (as in Markdown), extended for optional link
names after pipe (as in Slack) or whitespace (assuming escaped in urls).
return $input; # allow html input as is if privileged
}
$markup = [
return $input; # allow html input as is if privileged
}
$markup = [
+ '{<((?:\w+:|/).+?)>}' => '<$1>', # unescape link entities
+ '{<(?:https?://)?([^>\s|]+)>}' => '<$1 $1>', # unnamed link
+ '{<([^>\s|]+)[\s|]([^>]+)>}' => '<a href="$1">$2</a>', # hyperlink
"/\r\n?/" => "\n", # unix newlines
"/ +\n/" => "<br />", # trailing spaces for hard line break
"/\n/" => "</p>\n<p>", # newlines start paragraphs
"/\r\n?/" => "\n", # unix newlines
"/ +\n/" => "<br />", # trailing spaces for hard line break
"/\n/" => "</p>\n<p>", # newlines start paragraphs