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

Inline formatting can't cross line boundaries in line blocks. #9119

Closed
van-de-bugger opened this issue Oct 3, 2023 · 1 comment
Closed

Comments

@van-de-bugger
Copy link

Pandoc documentation allows inline formatting in line blocks:

Inline formatting (such as emphasis) is allowed in the content, but not block-level formatting (such as block quotes or lists).

However, it seems inline formatting can't cross line boundaries. Consider an example:

$ cat test.md
*In normal paragraphs
emphasis works for
entire paragraph.*

| *But in line blocks
| emphasis doesn't work
| for entire block.*

| *Each line*
| *must be emphasized*
| *separately.*

$ pandoc -f markdown -t html5 ./test.md 
<p><em>In normal paragraphs emphasis works for entire
paragraph.</em></p>
<div class="line-block">*But in line blocks<br />
emphasis doesn’t work<br />
for entire block.*</div>
<div class="line-block"><em>Each line</em><br />
<em>must be emphasized</em><br />
<em>separately.</em></div>

In the first line block asterisks are not recognized as emphasis. That's probably not a big issue, but you may want to fix either implementation or documentation.

pandoc 2.19.2
Compiled with pandoc-types 1.22.2.1, texmath 0.12.5.5, skylighting 0.13.2,
citeproc 0.8.1, ipynb 0.2, hslua 2.2.1
Scripting engine: Lua 5.4
Fedora 38 @ x86_64

@jgm
Copy link
Owner

jgm commented Oct 4, 2023

We represent a lineblock as a list of [Inline] lines, which we need to parse individually, so we can't really have formatting crossing line breaks. We can document this though.

@jgm jgm added the docs label Oct 4, 2023
@jgm jgm closed this as completed in e426b3d Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants