public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* convincing the markdown reader/writer to preserve yaml string literal formatting
@ 2015-08-25 14:50 Matt Porter
       [not found] ` <26c50d7f-d78c-4b40-b76a-09ebf6026173-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Porter @ 2015-08-25 14:50 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1462 bytes --]

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/26c50d7f-d78c-4b40-b76a-09ebf6026173%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2579 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-25 20:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-25 14:50 convincing the markdown reader/writer to preserve yaml string literal formatting Matt Porter
     [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).