From a5a7fdbe5fb01654a832ad2cf482d40966e1d9df Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Tue, 8 Jul 2014 13:42:06 +0200 Subject: 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 --- src/fe-common/core/fe-messages.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 25c20109..fcc55a67 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -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)) { -- cgit v1.2.3