source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Bugfix: When a line ends with '\ \"', don't strip the trailing
@ 2018-08-18 22:06 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-08-18 22:06 UTC (permalink / raw)
  To: source

Log Message:
-----------
Bugfix: When a line ends with '\ \"', don't strip the trailing space
because that turned it into a bogus line continuation.

Modified Files:
--------------
    mandoc:
        roff.c

Revision Data
-------------
Index: roff.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/roff.c,v
retrieving revision 1.334
retrieving revision 1.335
diff -Lroff.c -Lroff.c -u -p -r1.334 -r1.335
--- roff.c
+++ roff.c
@@ -1214,7 +1214,8 @@ roff_res(struct roff *r, struct buf *buf
 
 		/* Discard normal comments. */
 
-		while (stesc > start && stesc[-1] == ' ')
+		while (stesc > start && stesc[-1] == ' ' &&
+		    (stesc == start + 1 || stesc[-2] != '\\'))
 			stesc--;
 		*stesc = '\0';
 		break;
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

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

only message in thread, other threads:[~2018-08-18 22:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-18 22:06 mandoc: Bugfix: When a line ends with '\ \"', don't strip the trailing 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).