1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

more strict rules for italic emphasis to avoid file name clashes

this additional check avoids /root/.hiddendir from italicising /root/,
because that is often used in path names
This commit is contained in:
Ailin Nemui 2014-07-08 13:42:06 +02:00
parent 05979c8d9f
commit a5a7fdbe5f

View File

@ -81,7 +81,8 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text)
if ((end = strchr(bgn+1, *bgn)) == NULL)
continue;
if (!ishighalnum(end[-1]) || ishighalnum(end[1]) ||
end[1] == type || end[1] == '*' || end[1] == '_')
end[1] == type || end[1] == '*' || end[1] == '_' ||
(type == 29 && end[1] != NULL && ishighalnum(end[2])))
continue;
if (IS_CHANNEL(item)) {