-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
rst writer: indentation problem with BlockQuote at beginning of list item #10236
Comments
I think the commit you reference did fix this. |
For me it is not working with the nightly build. I used this version: Current output:
|
OK, thanks, can you give me a complete input to test with (the one above is not complete)? |
Never mind, was able to get this by converting your expected output: [ Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault , ColWidth 0.26 ) ]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ BlockQuote
[ Para [ Emph [ Str "Level" , Space , Str "0:" ] ]
, Para
[ Emph [ Str "Incomplete" , Space , Str "process" ]
]
]
]
]
]
]
(TableFoot ( "" , [] , [] ) [])
]
|
OK, this is not specific to list tables. Here's a test case with a regular list containing a block quote:
|
The question is how you are supposed to represent this in RST. I tried
with docutils rst2html and got <ul>
<li><p class="first"><em>Level 0:</em></p>
<p><em>Incomplete process</em></p>
</li>
</ul> Does RST actually have any way of representing a block quote at the beginning of a list item? |
I have created an example, which works for me:
As you can see, I'm adding a hidden text block with html output:
Here rendered as a web page. In Safari, it looks not so good, but in Firefox it is fine. (I suggest to scroll down in Safari, to detect that Safari is not correctly indenting the Here is a link to a playground repository, where the rst code is available and render with sphinx/docutils to above page. In GitHub, the quoted blocks are even rendered correct in the preview. I cannot ensure, that the side is available long time. |
But then you also have an empty paragraph. So, semantically it is not the same... |
This works better:
rst2html gives: <ul>
<li><!-- -->
<blockquote>
<p>block quote</p>
</blockquote>
</li>
</ul> |
Have the same solution.
html:
|
But how does Pandoc translate the empty comment in the native model? |
It will just be ignored. |
In these cases we emit an empty comment to fix the point from which indentation is measured; otherwise the block quote is not parsed as a block quote. This affects list items and admonitions. Cloess #10236.
It is still not working, even with the nightly build . Maybe we missed the |
Sorry, yes -- I hadn't realized that list tables didn't reuse the code for lists! Will fix. |
With this patch, we also reuse bullet list code for list tables, which simplifies the code.
OK it should work now. |
Explain the problem.
I'm using rst writer with list-tables.
If the content of a cell is a
BlockQuote
, the indention of the block looks wrong in the rst output.Input:
Current output:
Expected output:
I cannot identify the wrong code line, but the transformation of the
BLockQuote
looks fine see.Maybe it is some where in the table processing.
From the logic, even following output would be fine:
I'm even not sure if it is fixed with commit.
I even fear, if we change here the processing, that the output of classical tables breaks.
As it works for these:
Pandoc version?
3.4
The text was updated successfully, but these errors were encountered: