From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/14736 Path: news.gmane.org!not-for-mail From: Matt Haggard Newsgroups: gmane.text.pandoc Subject: Re: Can I eliminate newlines between elements in generated HTML? Date: Fri, 8 Apr 2016 09:24:45 -0700 (PDT) Message-ID: <5f012215-b6af-4fa3-b8a7-e8ba2b51ac9b@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_198_161474390.1460132685500" X-Trace: ger.gmane.org 1460132689 12969 80.91.229.3 (8 Apr 2016 16:24:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2016 16:24:49 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDDMH3V6RIBRBTNWT64AKGQEEOVZ5TY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Apr 08 18:24:48 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-qg0-f57.google.com ([209.85.192.57]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aoZDC-0002GG-UW for gtp-pandoc-discuss@m.gmane.org; Fri, 08 Apr 2016 18:24:47 +0200 Original-Received: by mail-qg0-f57.google.com with SMTP id f105sf23572166qge.1 for ; Fri, 08 Apr 2016 09:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=c2zIgYFOcdbO8L37kE434uKwQ5yLqMfPeRNv2F0pgLg=; b=PlbJKT7SVtfJIBTtZy+fabgpYMJNM4fPIwssoMZGBD/1gIoplqP43vhYYuLbs0jnuX BHNKiXkKxJOsFEu+WlVAsZZmWnR0FpkLyNThQ7GoxbK7N2Wj8+iCsxY0+2ElTKELUqNa OVQbVGpyiIGpQqhasU6L/MZpAY6U1FFHjjAVqHHM9mtjlzAPKLUMyw30iwBOdlBrXZ82 veHIkM5Xzgx2gRpZkVnVR+74G4TdzoRjByyKeAhRNrJu5W9oCGJkF+FTDbUoV3pK+ICr YYJiuvWbS0yftVRGUKa5jyNmtCNaFTFMU2BGVw1eq1cWSBuhdRkuHPbEwB2s2SaK59Rb ESLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=c2zIgYFOcdbO8L37kE434uKwQ5yLqMfPeRNv2F0pgLg=; b=UUA8d8kk5Y5/jbcJKJeLUiqhN7BIOO9HOcGbjxeW9MwJQBMCgvpfG47fHO6t1fcyJy edaCBe+wnpue3JMKq2/15WcAUUWTOvRkDGMidRptbUEPZ2LwW8pmzr6s7NGYnywHFQyl YWJGUR0NeF6uC0ClzJrPSAYg6V2j70dxGGlcu3n01kFTioONHPwsvhBMGQCCU7mG0vYa b8hBRodB1ZFCDGASVbSeY60QJHQwCgHcnR7X3DzGCtQtr2zXYG3vEeG6xObNWhg86n+3 YcR2S/CwflTWLn+FAyXrCVX8yAMohUXCDZiPXemIHfoolT/ylkEhjTBu4k/0PdkpJboa Vwqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=c2zIgYFOcdbO8L37kE434uKwQ5yLqMfPeRNv2F0pgLg=; b=bPzG6uEDRneqpLudjXd3dCFN2P6QlII5IBXszQ+7fxtej35eO9qiv2Kac0xrwvQxJt ucHE8+KgOCk1X+AiW55jz8caNL5Ccxb0eTwIXQsb91Gp3ozywpLVEa+tjNqsUNmdV3Kf hQfy0+UVMjJCQrqHrIxGNklQemHvEIEEC2F0UvwyVDD+SDzof/qMPZRsoLwi4oz7s8JU E+POU4N+psNb7LwkEaqFSSc0BFOkVlaH+0rE9YY18vVbkqBYN6ogN8yWV89N2cJ0VxAM xAFu8sGrhmI7nGNGYfS+QJHzWvcvxP96vpUf1qNtl/dv+izKQTEGCIfn59bFbomYq5ic hO4A== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AD7BkJLah2+Krc2F5WiWWjZ4DF+hvMt6h9SaA5Pc5sXU0GwXy7wD5ViKKaH4bsOiu0BDuQ== X-Received: by 10.182.39.69 with SMTP id n5mr112400obk.11.1460132686235; Fri, 08 Apr 2016 09:24:46 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.33.117 with SMTP id l50ls581636otd.7.gmail; Fri, 08 Apr 2016 09:24:45 -0700 (PDT) X-Received: by 10.182.80.74 with SMTP id p10mr112706obx.8.1460132685825; Fri, 08 Apr 2016 09:24:45 -0700 (PDT) In-Reply-To: X-Original-Sender: haggardii-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:14736 Archived-At: ------=_Part_198_161474390.1460132685500 Content-Type: multipart/alternative; boundary="----=_Part_199_345953739.1460132685500" ------=_Part_199_345953739.1460132685500 Content-Type: text/plain; charset=UTF-8 Bah... google groups messed up the newlines, but maybe you get the idea? On Friday, April 8, 2016 at 10:23:55 AM UTC-6, Matt Haggard wrote: > > I have a filter that adds elements to code blocks (for bolding, italics, > etc.). We go markdown -> html -> pdf and have noticed that sometimes there > is an extra erroneous space between these custom elements in the final PDF. > This breaks copying and pasting. > > It's because pandoc adds newlines between some elements in the generated > HTML. This shows and example: > > echo -e > '
hello
world
' | > pandoc -t html5 > >
> >
hello
> >
world
> >
> > > Is there a way I can get the output of the above to instead be this? (or > even match the original input string) > > echo -e > '
hello
world
' | > pandoc -t html5 > >
> >
hello
world
> >
> > Thank you! > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5f012215-b6af-4fa3-b8a7-e8ba2b51ac9b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_199_345953739.1460132685500 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Bah... google groups messed up the newlines, but maybe you= get the idea?

On Friday, April 8, 2016 at 10:23:55 AM UTC-6, Matt H= aggard wrote:
= I have a filter that adds elements to code blocks (for bolding, italics, et= c.). =C2=A0We go markdown -> html -> pdf and have noticed that someti= mes there is an extra erroneous space between these custom elements in the = final PDF. =C2=A0This breaks copying and pasting.

It'= ;s because pandoc adds newlines between some elements in the generated HTML= . =C2=A0This shows and example:

echo -e '<div><pre><code>hello</code></pre><pre><code>world</code></pre></d= iv>' | pandoc -t html5

<div>

<pre><code>= hello</code></pre>

<<= /span>pre>&= lt;code= >world</code></pre>

= </div= >

=


Is there a way I can get the output of the above to= instead be this? =C2=A0(or even match the original input string)

echo -= e '<div><pre><code>= hello</code></pre><pre><code>world</code>= ;</pre></div>' | pandoc -t html5

<div>

<pre><code>hello<<= span style=3D"color:#080">/code></p= re><pre><code>world</code></pre>

</div>


Thank you!

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/5f012215-b6af-4fa3-b8a7-e8ba2b51ac9b%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_199_345953739.1460132685500-- ------=_Part_198_161474390.1460132685500--