summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-messages.c
diff options
context:
space:
mode:
authorAilin Nemui <ailin@esf51.localdomain>2014-07-24 09:42:57 +0200
committerAilin Nemui <ailin@esf51.localdomain>2014-07-24 09:42:57 +0200
commit07e37c23297201f1584c00233a54ed2a2ab50ad5 (patch)
tree7427600a37ae1e51d9439b7fe360e4cda3f3e575 /src/fe-common/core/fe-messages.c
parente7f83c1dd2743a8f4f0d240f4550d6f52e6250c0 (diff)
downloadirssi-07e37c23297201f1584c00233a54ed2a2ab50ad5.zip
fix rules for italics emphasis
while the last patch did stop /path/.xxx from turning italic, it also stopped any other /emphasis/ from becoming italic. correct this by testing for ispunct, so spaces are valid italic terminators
Diffstat (limited to 'src/fe-common/core/fe-messages.c')
-rw-r--r--src/fe-common/core/fe-messages.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c
index 56fe89f8..95d9a9d8 100644
--- a/src/fe-common/core/fe-messages.c
+++ b/src/fe-common/core/fe-messages.c
@@ -82,7 +82,9 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text)
continue;
if (!ishighalnum(end[-1]) || ishighalnum(end[1]) ||
end[1] == type || end[1] == '*' || end[1] == '_' ||
- (type == 29 && end[1] != '\0' && ishighalnum(end[2])))
+ /* special case for italics to not emphasise
+ common paths by skipping /.../.X */
+ (type == 29 && i_ispunct(end[1]) && ishighalnum(end[2])))
continue;
if (IS_CHANNEL(item)) {