source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: fix a regression introduced in 1.11.7: even a breakable hyphen
@ 2011-09-18 21:18 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2011-09-18 21:18 UTC (permalink / raw)
  To: source

Log Message:
-----------
fix a regression introduced in 1.11.7:
even a breakable hyphen may be bold or underlined
ok kristaps@

Modified Files:
--------------
    mdocml:
        term.c

Revision Data
-------------
Index: term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term.c,v
retrieving revision 1.198
retrieving revision 1.199
diff -Lterm.c -Lterm.c -u -p -r1.198 -r1.199
--- term.c
+++ term.c
@@ -576,13 +576,16 @@ encode(struct termp *p, const char *word
 		adjbuf(p, p->col + 1 + (len * 3));
 
 	for (i = 0; i < len; i++) {
-		if ( ! isgraph((unsigned char)word[i])) {
+		if (ASCII_HYPH != word[i] &&
+		    ! isgraph((unsigned char)word[i])) {
 			p->buf[p->col++] = word[i];
 			continue;
 		}
 
 		if (TERMFONT_UNDER == f)
 			p->buf[p->col++] = '_';
+		else if (ASCII_HYPH == word[i])
+			p->buf[p->col++] = '-';
 		else
 			p->buf[p->col++] = word[i];
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-18 21:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-18 21:18 mdocml: fix a regression introduced in 1.11.7: even a breakable hyphen schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).