Skip to content

org verse paragraphs with blank lines are not parsed properly #2402

Closed
ag91 opened this Issue · 2 comments

3 participants

@ag91

Thank you for Pandoc!

I am using 1.15.0.6 to translate a file from org to pdf.
A simplified of my file is:


* section
** subsection

#+BEGIN_VERSE
bla

bla
#+END_VERSE

This file is translated in the pdf text:

 
Contents
section
1
subsection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
section
subsection
#+BEGIN VERSE bla
bla
#+END VERSE

In order to not having the superfluous #+BEGIN VERSE ... bit, I need to close the verse paragraph before the blank line and open another one later:


* section
** subsection

#+BEGIN_VERSE
bla
#+END_VERSE

#+BEGIN_VERSE
bla
#+END_VERSE

Since, the QUOTE paragraph works with blank spaces properly, I was wondering if this can be fixed easily.
Thanks!

@jgm
Owner

@tarleb - issue is that VERSE environments in the org reader don't seem to allow blank lines.
Easy to fix?

@tarleb

Just looking at the code, it seems like blank lines were allowed already. I'm investigating.

@tarleb tarleb added a commit to tarleb/pandoc that referenced this issue
@tarleb tarleb Make sure verse blocks can contain empty lines
The previous verse parsing code made the faulty assumption that empty
strings are valid (and empty) inlines.  This isn't the case, so lines
are changed to contain at least a newline.

It would generally be nicer and faster to keep the newlines while
splitting the string.  However, this would require more code, which
seems unjustified for a simple (and fairly rare) block as *verse*.

This fixes #2402.
8007dd9
@jgm jgm closed this in #2406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.