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

Better output formatting of forced line breaks #1924

Closed
timtylin opened this issue Feb 5, 2015 · 1 comment · Fixed by #1925
Closed

Better output formatting of forced line breaks #1924

timtylin opened this issue Feb 5, 2015 · 1 comment · Fixed by #1925

Comments

@timtylin
Copy link
Contributor

timtylin commented Feb 5, 2015

This issues tracks the proposal to add a newline character \n after the associated LineBreak control character for certain writers, as per the discussion on pandoc-discuss.

The motivation for this is better output formatting of things written in markdown line-blocks, such as poetry, addresses, and algorithms. Since line-blocks do not have its own Block-level element, right now all lines from a line-block are simply concatenated with LineBreak. This change would make some outputs with large amount of line-block content much easier to inspect.

After looking through all the writers we have, the following writers stand out as candidates for this change:

  • Dokuwiki
  • HTML
  • EPUB (via HTML)
  • LaTeX
  • MediaWiki
  • OpenDocument
  • Texinfo
timtylin added a commit to timtylin/scholdoc that referenced this issue Feb 5, 2015
This change improves output formatting of content with a large amount of force line breaks, such as line-blocks. The following writers are affected:

* Dokuwiki
* HTML
* EPUB (via HTML)
* LaTeX
* MediaWiki
* OpenDocument
* Texinfo

This commit resolves jgm#1924
@jgm jgm closed this as completed in #1925 Feb 8, 2015
@hftf
Copy link
Contributor

hftf commented Jun 18, 2015

I found what was breaking my program after installing it and Pandoc on a new computer. According to the 1.14 changelog:

Append newline to the LineBreak in Dokuwiki, HTML, EPUB, LaTeX, MediaWiki, OpenDocument, Texinfo writers (#1924, Tim Lin).

In 1.13:

$ echo "[Para [LineBreak]]" | pandoc -f native | tee foo
<p><br /></p>
$ xpath foo "p[not(text())]"
Found 1 nodes:
-- NODE --
<p><br /></p>

In 1.14:

$ echo "[Para [LineBreak]]" | pandoc -f native | tee foo
<p><br />
</p>
$ xpath foo "p[not(text())]"
No nodes found

I don't necessarily disagree with this change; I just found it very surprising.

hftf added a commit to hftf/oligodendrocytes that referenced this issue Jun 18, 2015
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

Successfully merging a pull request may close this issue.

2 participants