Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paragraphs that are not followed by an empty line are not parsed correctly #84

Closed
sometimesfood opened this issue May 8, 2018 · 3 comments

Comments

@sometimesfood
Copy link

When a paragraph is not followed by an empty line, it is incorrectly moved to the following section by goorgeous.

This org snippet illustrates the problem:

* Foo
Foo paragraph.
* Bar
Bar paragraph.

Expected result: The snippet above should result in the following output:

<h1 id="foo">Foo</h1>

<p>Foo paragraph.</p>

<h1 id="bar">Bar</h1>

<p>Bar paragraph.</p>

Actual result: The snippet above results in the following output:

<h1 id="foo">Foo</h1>

<h1 id="bar">Bar</h1>

<p>Foo paragraph.
Bar paragraph.</p>

While empty-line paragraph style seems to be preferred in the org-mode community, org.el renders the example above correctly. Also, the org syntax reference states that "[e]mpty lines and other elements end paragraphs".

Here's a branch that adds a (failing) test case for this issue:
https://github.com/sometimesfood/goorgeous/tree/linebreak-fail
sometimesfood@8cc4f08

@sometimesfood
Copy link
Author

Just for reference: This seems to have been broken by commit 95384d4.

@sometimesfood sometimesfood changed the title Paragraphs that are not followed by an empty line are not correctly parsed Paragraphs that are not followed by an empty line are not parsed correctly May 26, 2018
@0pendev
Copy link

0pendev commented Oct 2, 2018

Faced the same error when using gitea.
Would be nice to find a way to resolve it.

@curiouslychase
Copy link
Owner

I had a branch I was getting ready to PR into Hugo this week that fixed this, but it looks like @niklasfasching PR'ed a new org parser, so I'm closing all the issues here, deprecating and archiving goorgeous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants