* Re: convincing the markdown reader/writer to preserve yaml string literal formatting
[not found] ` <26c50d7f-d78c-4b40-b76a-09ebf6026173-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-08-25 17:54 ` nkalvi
2015-08-25 18:08 ` nkalvi
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: nkalvi @ 2015-08-25 17:54 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1946 bytes --]
Hi M att,
Based on a similar issue
<https://groups.google.com/forum/#!msg/pandoc-discuss/xuqEmhWgf9A/VPKIePhUvscJ>,
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.
[-- Attachment #1.2: Type: text/html, Size: 4886 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: convincing the markdown reader/writer to preserve yaml string literal formatting
[not found] ` <26c50d7f-d78c-4b40-b76a-09ebf6026173-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-25 17:54 ` nkalvi
@ 2015-08-25 18:08 ` nkalvi
2015-08-25 18:17 ` nkalvi
2015-08-25 20:13 ` John MACFARLANE
3 siblings, 0 replies; 5+ messages in thread
From: nkalvi @ 2015-08-25 18:08 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1922 bytes --]
Hi Matt,
Based on a similar issue
<https://groups.google.com/forum/#!msg/pandoc-discuss/xuqEmhWgf9A/VPKIePhUvscJ>,
could you please try this:
---
example: |
| foo@bar {
| baz = <11>;
| };
...
Angel brackets are still escaped, 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/b348f468-2622-4f1f-9b33-e5f672237bb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 4092 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: convincing the markdown reader/writer to preserve yaml string literal formatting
[not found] ` <26c50d7f-d78c-4b40-b76a-09ebf6026173-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-25 17:54 ` nkalvi
2015-08-25 18:08 ` nkalvi
@ 2015-08-25 18:17 ` nkalvi
2015-08-25 20:13 ` John MACFARLANE
3 siblings, 0 replies; 5+ messages in thread
From: nkalvi @ 2015-08-25 18:17 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1722 bytes --]
Or even:
---
example: |
```
foo@bar {
baz = <11>;
};
```
...
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/da520dab-df5e-45c8-8055-ea80a023e768%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 3841 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: convincing the markdown reader/writer to preserve yaml string literal formatting
[not found] ` <26c50d7f-d78c-4b40-b76a-09ebf6026173-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
` (2 preceding siblings ...)
2015-08-25 18:17 ` nkalvi
@ 2015-08-25 20:13 ` John MACFARLANE
3 siblings, 0 replies; 5+ messages in thread
From: John MACFARLANE @ 2015-08-25 20:13 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
Unfortunately pandoc has no good way of marking up a
metadata field to say "don't parse me as Markdown,
I'm just a literal string!" There is an idea for doing
this developed in the comments on this issue:
https://github.com/jgm/pandoc/issues/2139
You might want to comment there (and/or here).
In the mean time you can always pass in literal content
using --variable.
John
+++ Matt Porter [Aug 25 15 07:50 ]:
> 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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to
> [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> [3]https://groups.google.com/d/msgid/pandoc-discuss/26c50d7f-d78c-4b40-
> b76a-09ebf6026173%40googlegroups.com.
> For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
> 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 3. https://groups.google.com/d/msgid/pandoc-discuss/26c50d7f-d78c-4b40-b76a-09ebf6026173-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
> 4. https://groups.google.com/d/optout
^ permalink raw reply [flat|nested] 5+ messages in thread