From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/13508 Path: news.gmane.org!not-for-mail From: nkalvi Newsgroups: gmane.text.pandoc Subject: Re: convincing the markdown reader/writer to preserve yaml string literal formatting Date: Tue, 25 Aug 2015 10:54:28 -0700 (PDT) Message-ID: <6a5b87f8-1235-4226-898e-1b0a436852e4@googlegroups.com> References: <26c50d7f-d78c-4b40-b76a-09ebf6026173@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_135_402616650.1440525268603" X-Trace: ger.gmane.org 1440525289 8441 80.91.229.3 (25 Aug 2015 17:54:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2015 17:54:49 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC423VNOQYLBBVOX6KXAKGQEGUNR6LA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 25 19:54:31 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ob0-f184.google.com ([209.85.214.184]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZUIQY-00040J-LN for gtp-pandoc-discuss@m.gmane.org; Tue, 25 Aug 2015 19:54:30 +0200 Original-Received: by obkg7 with SMTP id g7sf42997141obk.1 for ; Tue, 25 Aug 2015 10:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe; bh=EKwYobWvwfwMEn5EBQmbSg47PusvY9cRYX9ZcJKNpeM=; b=Mz8GvdAEkw/MFaALzQQv0uIOcQIfr6wv12kLDWd0UyepvZQNOSyhDHgZbGPM8eKV7/ gW9sGZyfvKWeJfkMiP8Zu7Nu3KfPXyR2dJOud/N7QPePov0dUxfwqlxmjUfWiTxhW9gU yJ7uRdLDDX2bZtE1rsGxw+/XiwPPZEYD7Q6YbX36ovSe4pnoBQ+NUVL53d36y2lN8bBd h5KI9VVRP8qAMxwNh4G8uKIdRb8DL/xOsV9rsBDLAKqYCLLDNOAWKBH0jEE9U4Km08Nl gUAPW5ryIN/CzEaj9fuC/GSy63ZYHXjcUjzOPYpvumiK1VCOZ7v2MFQd0Zw3CpaHdtBZ u2wQ== X-Received: by 10.182.94.238 with SMTP id df14mr54802obb.37.1440525269952; Tue, 25 Aug 2015 10:54:29 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.182.142.202 with SMTP id ry10ls4649498obb.10.gmail; Tue, 25 Aug 2015 10:54:29 -0700 (PDT) X-Received: by 10.182.80.230 with SMTP id u6mr105936obx.42.1440525269407; Tue, 25 Aug 2015 10:54:29 -0700 (PDT) In-Reply-To: <26c50d7f-d78c-4b40-b76a-09ebf6026173-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: kana-a9OgVwmGd9+sTnJN9+BGXg@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:13508 Archived-At: ------=_Part_135_402616650.1440525268603 Content-Type: multipart/alternative; boundary="----=_Part_136_1475563827.1440525268603" ------=_Part_136_1475563827.1440525268603 Content-Type: text/plain; charset=UTF-8 Hi M att, Based on a similar issue , could you try something like --- example: | | foo@bar { | baz = <11>; | }; ... Angel brackets are still escaped in the output, but that may not be a problem. On Tuesday, August 25, 2015 at 10:50:47 AM UTC-4, Matt Porter wrote: > > I'm experimenting with using pandoc to generate customized documentation > based on a yaml data stream and a custom template. > > I have the following inputs: > > test.yaml > ------------ > > --- > example: | > foo@bar { > baz = <11>; > }; > ... > > > test.template > ----------------- > > $if(example)$ > # Example > $endif$ > $for(example)$ > ``` > $example$ > ``` > $endfor$ > > > command line > ------------------- > > $ pandoc test.yaml --from markdown+yaml_metadata_block --template > test.template -s -o test.md > > > test.md > ---------- > > # Example > ``` > foo@bar { baz = \<11\>; }; > ``` > > > I see that the markdown support drops the newlines and whitespace in my > yaml string. It also escapes > other characters since it doesn't realize this is something I want > preserved. > > Is there some way to convince pandoc's markdown reader/writer to yield > output like the following? > > ``` > foo@bar { > baz = <11>; > }; > ``` > > Thanks, > Matt > -- 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/6a5b87f8-1235-4226-898e-1b0a436852e4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_136_1475563827.1440525268603 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi M att,

Based on a sim= ilar issue, could you try something like

---

example: |

=C2=A0 |=C2=A0 = foo@bar {

=C2=A0 |=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 baz =3D <11>;

=C2=A0 |=C2=A0 = };

...


Angel brackets are still escaped in the outp= ut, but that may not be a problem.
=C2=A0

On Tuesda= y, August 25, 2015 at 10:50:47 AM UTC-4, Matt Porter wrote:
I'm experimenting with us= ing pandoc to generate customized documentation based on a yaml data stream= and a custom template.

I have the following inputs:

test.yaml
------------

=
---
example: |
=C2=A0 foo@bar {
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 baz =3D <11>;
=C2=A0 };
...


test.template
-----------------

$if(example)$
# Example
$endif$
$for(example)$
```
=
$example$
```
$endfor$

<= div>
command line
-------------------
$ pandoc test.yaml --from markdown+yaml_metadata_block --templa= te test.template -s -o test.md

<= div>
----------

# Example
```
foo@bar { baz =3D \= <11\>; };
```


I see that the markdown support drops the newlines and whitespace in my ya= ml string. It also escapes
other characters since it doesn't = realize this is something I want preserved.

Is the= re some way to convince pandoc's markdown reader/writer to yield output= like the following?

```
=C2=A0 foo= @bar {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 baz =3D <11>;
=C2=A0 };
```

Thanks,
=
Matt

--
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/6a5b87f8-1235-4226-898e-1b0a436852e4%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_136_1475563827.1440525268603-- ------=_Part_135_402616650.1440525268603--