* docbook2mdoc: When moving the last word of a text node into its own node
@ 2019-05-02 4:09 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-05-02 4:09 UTC (permalink / raw)
To: source
Log Message:
-----------
When moving the last word of a text node into its own node
for use with .Pf before a macro node, make sure what remains
of the original text node isn't leading whitespace only.
Modified Files:
--------------
docbook2mdoc:
parse.c
Revision Data
-------------
Index: parse.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/parse.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -Lparse.c -Lparse.c -u -p -r1.57 -r1.58
--- parse.c
+++ parse.c
@@ -354,12 +354,12 @@ pnode_closetext(struct parse *p, int che
while (cp > n->b && !isspace((unsigned char)cp[-1]))
cp--;
- if (cp == n->b)
- return;
-
last_word = cp;
while (cp > n->b && isspace((unsigned char)cp[-1]))
- *--cp = '\0';
+ cp--;
+ if (cp == n->b)
+ return;
+ *cp = '\0';
/* Move the last word into its own node, for use with .Pf. */
--
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:[~2019-05-02 4:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 4:09 docbook2mdoc: When moving the last word of a text node into its own node 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).