public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* No newline between multiple markdown input files?
@ 2015-08-31 15:22 david.pw.smith-Re5JQEeQqe8AvxtiuMwx3w
       [not found] ` <8c77dca7-b4b9-4501-8d78-4fe89e5a0f4f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: david.pw.smith-Re5JQEeQqe8AvxtiuMwx3w @ 2015-08-31 15:22 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi all,

I was wondering about how pandoc concatenates files when multiple inputs 
are specified, specifically whether it would be better to add a blank line 
between separate files. I have a few markdown files that make up a larger 
document, and, since none of them have a blank line left at the end, only a 
standard unix \n, the only way to get pandoc not to swallow the paragraphs 
is to do:

```
awk 'FNR==1{print ""}1' | pandoc
```

This seems a bit backwards to me --- I can't really think of a reason that 
someone would spread out a single paragraph over two files, so couldn't 
pandoc do the lifting here?

Do let me know if I'm barking up the wrong tree!

Cheers,

Dave

-- 
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/8c77dca7-b4b9-4501-8d78-4fe89e5a0f4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: No newline between multiple markdown input files?
       [not found] ` <8c77dca7-b4b9-4501-8d78-4fe89e5a0f4f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-08-31 19:51   ` John MACFARLANE
  0 siblings, 0 replies; 2+ messages in thread
From: John MACFARLANE @ 2015-08-31 19:51 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Pandoc does add an extra newline between sources.

In the ordinary case, where the sources end with a
newline, this should give you a blank line (two newlines
in a row).  Be sure your source really ends with a newline.

I don't want to add two newlines, because there are
cases where one might not want the blank line, and in
such cases one can leave the newline off.

For example, one might want to end source #1 with

``` haskell

and then use a Haskell program for source #2,
and start source #3 with

```

This would give you a code block with the program.

+++ david.pw.smith-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [Aug 31 15 08:22 ]:
>   Hi all,
>   I was wondering about how pandoc concatenates files when multiple
>   inputs are specified, specifically whether it would be better to add a
>   blank line between separate files. I have a few markdown files that
>   make up a larger document, and, since none of them have a blank line
>   left at the end, only a standard unix \n, the only way to get pandoc
>   not to swallow the paragraphs is to do:
>   ```
>   awk 'FNR==1{print ""}1' | pandoc
>   ```
>   This seems a bit backwards to me --- I can't really think of a reason
>   that someone would spread out a single paragraph over two files, so
>   couldn't pandoc do the lifting here?
>   Do let me know if I'm barking up the wrong tree!
>   Cheers,
>   Dave
>
>   --
>   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/8c77dca7-b4b9-4501-
>   8d78-4fe89e5a0f4f%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/8c77dca7-b4b9-4501-8d78-4fe89e5a0f4f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


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

end of thread, other threads:[~2015-08-31 19:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31 15:22 No newline between multiple markdown input files? david.pw.smith-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <8c77dca7-b4b9-4501-8d78-4fe89e5a0f4f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-31 19:51   ` 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).