From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-01.scc.kit.edu (scc-mailout-kit-01.scc.kit.edu [129.13.231.81]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id f86320ab for ; Tue, 2 Apr 2019 11:50:40 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-01.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1hBMcP-00069H-Jj; Tue, 02 Apr 2019 18:50:39 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1hBMcO-0002XX-5G; Tue, 02 Apr 2019 18:50:36 +0200 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1hBMcN-00081I-OD; Tue, 02 Apr 2019 18:50:35 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id fd2e350f; Tue, 2 Apr 2019 18:50:35 +0200 (CEST) Date: Tue, 2 Apr 2019 18:50:35 +0200 From: Ingo Schwarze To: Stephen Gregoratto Cc: tech@mandoc.bsd.lv Subject: Re: Parsing errors, output regressions with new XML parser Message-ID: <20190402165035.GF6369@athene.usta.de> References: <20190330001919.rrbc2xxrx47upalg@BlackBox> X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190330001919.rrbc2xxrx47upalg@BlackBox> User-Agent: Mutt/1.8.0 (2017-02-23) Hi Stephen, Stephen Gregoratto wrote on Sat, Mar 30, 2019 at 11:19:19AM +1100: > - There are regressions in how and > nodes are transformed. The example I pointed out previously: > > > > Joe > Bloggs > > joe@foo.net > > > Now converts to: > > .Dd $Mdocdate$ > .Dt UNKNOWN 1 > .Os > .Sh AUTHORS > .Nm foo > is maintained by > .An \&Joe Bloggs , > .Aq Mt joe@foo.net > \&. Fixing that was quite straightforward, see the commit below. I also added a regression test based on your example to my regress/ directory, which is so far private. But at some point, i will almost certainly want to publish that; i didn't do that yet because making Makefiles portable is a pain. Are you comfortable with your contributions being included under the ISC license (of course including the correct Copyright notice with your name)? $ cat regress/author/email.{xml,out} Placeholder Inc. joe@foo.net Joe Bloggs .An \&Joe Bloggs Aq Mt joe@foo.net , Placeholder Inc. Thanks, Ingo Log Message: ----------- use the idiom ".An Name Aq Mt email" for author email addresses; issue reported by Stephen Gregoratto Modified Files: -------------- docbook2mdoc: docbook2mdoc.c Revision Data ------------- Index: docbook2mdoc.c =================================================================== RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v retrieving revision 1.79 retrieving revision 1.80 diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.79 -r1.80 --- docbook2mdoc.c +++ docbook2mdoc.c @@ -438,6 +438,16 @@ pnode_printauthor(struct format *f, stru } /* + * If there is an email address, + * print it on the same macro line. + */ + + if ((nc = pnode_findfirst(n, NODE_EMAIL)) != NULL) { + pnode_print(f, nc); + pnode_unlink(nc); + } + + /* * If there are still unprinted children, end the scope * with a comma. Otherwise, leave the scope open in case * a text node follows that starts with closing punctuation. -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv