From: joerg@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Correctly handle constructs like .TP 8 .SH foo
Date: Wed, 16 Nov 2011 17:39:05 -0500 (EST) [thread overview]
Message-ID: <201111162239.pAGMd58W002354@krisdoz.my.domain> (raw)
Log Message:
-----------
Correctly handle constructs like
.TP 8
.SH foo
Modified Files:
--------------
mdocml:
man.c
Revision Data
-------------
Index: man.c
===================================================================
RCS file: /home/joerg/cvsroot/mdocml/man.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -Lman.c -Lman.c -u -p -r1.113 -r1.114
--- man.c
+++ man.c
@@ -556,10 +556,15 @@ man_pmacro(struct man *m, int ln, char *
if ((m->flags & MAN_BLINE) &&
(MAN_BSCOPE & man_macros[tok].flags)) {
n = m->last;
- assert(MAN_TEXT != n->type);
- /* Remove element that didn't end BLINE, if any. */
+ /* Might be a text node like 8 in
+ * .TP 8
+ * .SH foo
+ */
+ if (MAN_TEXT == n->type)
+ n = n->parent;
+ /* Remove element that didn't end BLINE, if any. */
if ( ! (MAN_BSCOPE & man_macros[n->tok].flags))
n = n->parent;
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2011-11-16 22:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201111162239.pAGMd58W002354@krisdoz.my.domain \
--to=joerg@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).