ext/generate.c in rdiscount-1.2.7 vs ext/generate.c in rdiscount-1.2.7.1
- old
+ new
@@ -940,10 +940,10 @@
Qstring("</sup>", f);
}
break;
#endif
case '*':
- case '_': if ( tag_text(f) )
+ case '_': if ( tag_text(f) || (isthisspace(f,-1) && isthisspace(f,1)) || (isalnum(peek(f,-1)) && isalnum(peek(f,1))) )
Qchar(c, f);
#if RELAXED_EMPHASIS
else if ( peek(f,1) == c ) {
for ( rep = 1; peek(f,1) == c; pull(f) )
++rep;