From 055f6698c2530e686e7f271e12d32257147e3b08 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 30 Jan 2019 11:38:09 -0500 Subject: [PATCH] Use !isalnum instead of isspace for this_stuff --- src/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 44e1bb4..a8f0ea8 100644 --- a/src/main.c +++ b/src/main.c @@ -212,9 +212,7 @@ static void parse_text(struct parser *p) { parse_format(p, FORMAT_BOLD); break; case '_': - if ((p->flags & FORMAT_UNDERLINE)) { - parse_format(p, FORMAT_UNDERLINE); - } else if (!p->flags && isspace(last)) { + if (!isalnum(last) || (p->flags & FORMAT_UNDERLINE)) { parse_format(p, FORMAT_UNDERLINE); } else { utf8_fputch(p->output, ch);