mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-23 21:55:03 +00:00
Minor URL formatting tweaks.
This commit is contained in:
parent
964b11e197
commit
e58eb068fb
2 changed files with 3 additions and 2 deletions
|
@ -21,6 +21,6 @@ It also allows preformatted text using three backquotes in a single line:
|
|||
|
||||
```
|
||||
|
||||
URLs like https://en.wikipedia.org/wiki/Main_Page are made clickable.
|
||||
URLs like https://en.wikipedia.org/wiki/Main_Page are made clickable, https://codeberg.org/grunfink/snac2.
|
||||
|
||||
Some emojis: X-D <3 :beer: :shrug: :shrug2:
|
||||
|
|
3
format.c
3
format.c
|
@ -71,7 +71,8 @@ static d_char *format_line(const char *line)
|
|||
}
|
||||
else
|
||||
if (xs_startswith(v, "http")) {
|
||||
xs *s1 = xs_fmt("<a href=\"%s\" target=\"_blank\">%s</a>", v, v);
|
||||
xs *v2 = xs_strip_chars_i(xs_dup(v), ".");
|
||||
xs *s1 = xs_fmt("<a href=\"%s\" target=\"_blank\">%s</a>", v2, v);
|
||||
s = xs_str_cat(s, s1);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue