From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id caa9072f for ; Fri, 23 Nov 2018 15:22:35 -0500 (EST) Received: by mail-wm1-f65.google.com with SMTP id u13-v6so13028725wmc.4 for ; Fri, 23 Nov 2018 12:22:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vUk0fKOhxTHEVTxSiMzbPHnqCk92BAuMVGn1xuhZOPQ=; b=lxkvPdBQ5Rl7tcyPRtQ98Lik/iyBsSnO5t4WTQ4QHKfWQW/yAZmZCRN9mg6beexQvf Ngfb2dYfbk76hBkEkNGo/RuwYP5Cu099N86Fj+/cHgNIkY6zopXwR6lkBY1T2WpmOIUn eVLr+xtJopvsENXUDMcuYqjqZD8VwUMAXgam812qB3zgYVimq2ugi0VXUJu+NXLw6dfI zHwBo6qHihIxJyrcuK+6XQCWHrrUVxDf+jtRMiwWtCMEn5UBYZDKxTV9UmT725onOsgD 9bW2ek2GtuNBUwOSWC8+L0p0FnP7rh7dJ+6jrr4cT4b1Xk3y0+dqOfTF2HkVwJweWokN MssA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vUk0fKOhxTHEVTxSiMzbPHnqCk92BAuMVGn1xuhZOPQ=; b=k9YV+aa9UYYCIjgPQyac65HgNVIVXaAV9PQj/7aBUDMmplO8q9lXcWnrcR7X9KgU4I MVhHgi5jNPDopQaYXd0f+BcGc0+Q6VGxgXK5fktdt0IVnEaiUneiNpJ8x/k1OvPgI/t8 YbzF/CN2FBPYGnrhz7Uc0GOf67SvoWjJtCvtqHdYpjtPxJdO4uqFK7ZtYJdzjUV6RP9b 8w4iKw8tPajxaxTr6UfHwPq+xXEJMnM92sGliA/aLcVhIR0jupNIsOeJBMX3HPDn1x2z qDii80GOgJIqc4ZtwadPLcNriiARiFlOy4bUplVNZYfK2cAJxHeh/+IUeL32+FOUT6Gn eylw== X-Gm-Message-State: AA+aEWZDjQroQ11B7Y12AS+KtuNBg36F9K8mOpIaCqUfc6a5HS/XsP/C fiRQHMqTOkurSFNeSSVFyww= X-Google-Smtp-Source: AFSGD/VaEnCmpgRApXmzQ6DWMM1rtRx/zd4i67c//FiZ4dDmTFNb4oWCXesnWxRKXxBjbEz1mHQ0qQ== X-Received: by 2002:a1c:da92:: with SMTP id r140mr7378713wmg.136.1543004554243; Fri, 23 Nov 2018 12:22:34 -0800 (PST) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id k73sm12638814wmd.36.2018.11.23.12.22.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 12:22:32 -0800 (PST) Date: Fri, 23 Nov 2018 21:22:31 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Ingo Schwarze Cc: discuss@mandoc.bsd.lv Subject: Re: Undesirable space after parenthesis in HTML output Message-ID: <20181123202231.jiaupzi6igqqww6v@pali> References: <20181105200300.rnllxci2uhfj5w47@pali> <20181122140807.GF35604@athene.usta.de> <20181122142428.icetmrw6zptlsb3c@pali> <20181123193009.GA7177@athene.usta.de> X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="j5ls2tmxh24itkts" Content-Disposition: inline In-Reply-To: <20181123193009.GA7177@athene.usta.de> User-Agent: NeoMutt/20170113 (1.7.2) --j5ls2tmxh24itkts Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Friday 23 November 2018 20:30:09 Ingo Schwarze wrote: > Hi Pali, >=20 > Pali Rohar wrote on Thu, Nov 22, 2018 at 03:24:28PM +0100: >=20 > > $ printf "%s\ntest test test test test %s\n" \ > > 'Name (\fItest@example.org\fR)' 'Name (\fItest@example.org\fR)' \ > > | mandoc -T html > >=20 > > I got following output: > >=20 > >
Name (test@example.org) test test tes= t test test > > Name ( test@example.org)
> > > >=20 > > First Name is correct, second Name not. >=20 > Ah. Yes, i can reproduce that on -current. >=20 > It wasn't even related to parentheses. I just spotted it on lot of places around email addresses generated by pod2man, therefore I thought it is related to parentheses around. > The bug simply caused output > of whitespace in the middle of words when there were font escape > sequences - though not always. Whether the bug hit depended on the > spacing mode before the word containing the font escape, which made > it a bit elusive. >=20 > Fixed in the following commit. >=20 > Thanks for reporting the bug, > Ingo Thanks for fix! >=20 > Log Message: > ----------- > When a font escape appears in the middle of a string,=20 > make sure it doesn't cause output of bogus whitespace. > Fixing a bug reported by Pali dot Rohar at gmail dot com. >=20 > Modified Files: > -------------- > mandoc: > html.c >=20 > Revision Data > ------------- > Index: html.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/cvs/mandoc/mandoc/html.c,v > retrieving revision 1.242 > retrieving revision 1.243 > diff -Lhtml.c -Lhtml.c -u -p -r1.242 -r1.243 > --- html.c > +++ html.c > @@ -416,8 +416,11 @@ print_encode(struct html *h, const char=20 > case ESCAPE_FONTBI: > case ESCAPE_FONTCW: > case ESCAPE_FONTROMAN: > - if (0 =3D=3D norecurse) > + if (0 =3D=3D norecurse) { > + h->flags |=3D HTML_NOSPACE; > print_metaf(h, esc); > + h->flags &=3D ~HTML_NOSPACE; > + } > continue; > case ESCAPE_SKIPCHAR: > h->flags |=3D HTML_SKIPCHAR; --=20 Pali Roh=C3=A1r pali.rohar@gmail.com --j5ls2tmxh24itkts Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQS4VrIQdKium2krgIWL8Mk9A+RDUgUCW/hhhQAKCRCL8Mk9A+RD UkoCAJ0VGcWNEpnXSdGkPQ9IuLzr1SisegCfcMlxKpGPDchuu8+DhTs1bqQUIqs= =HgaY -----END PGP SIGNATURE----- --j5ls2tmxh24itkts-- -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv