summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Bartel <karl42@gmail.com>2019-09-29 16:57:00 +0200
committerEnno Boland <g@s01.de>2020-07-01 08:56:22 +0200
commit0bb70e62b863b7c7e9686ef058835957ae0ead7b (patch)
treed4f475f3645e36d2c7127afbca899e3bd8632ec0
parentc21412ce4899c134ea315cbdde0ab1f056de1463 (diff)
Allow link target in angular brackets
Example: [URL wrapped in angle brackets](</url/>).
-rw-r--r--smu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/smu.c b/smu.c
index c7ce849..dc72cb3 100644
--- a/smu.c
+++ b/smu.c
@@ -277,6 +277,13 @@ dolink(const char *begin, const char *end, int newblock) {
else {
linkend = q;
}
+
+ /* Links can be given in angular brackets */
+ if(*link == '<' && *(linkend - 1) == '>') {
+ link++;
+ linkend--;
+ }
+
len = q + 1 - begin;
if(img) {
fputs("<img src=\"", stdout);