-
-
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
Org writer: some issues and possible improvements with lists #7810
Labels
Comments
On 3: the code contains a comment that says
but I have no idea why (I didn't write this writer). It seems to me that this is not necessary at all in org. |
jgm
added a commit
that referenced
this issue
Jan 9, 2022
The code to do this was apparently copied over from the RST writer, but these blank lines aren't necessary or desirable in org. See #7810 comment 3.
jgm
added a commit
that referenced
this issue
Jan 9, 2022
jgm
added a commit
that referenced
this issue
Jan 9, 2022
T.P.Writers.Shared `endsWithPlain` now returns True if the list ends with a list which ends with a Plain. See #7810.
I believe I've now fixed all three issues. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, while writing tests for a org writer PR about lists I found a few corner cases related to newlines that are not handled very well. So I am filing this issue to keep a record of them.
This one is actually a bug since it generates invalid org (see this observation): the org file
"round trips" (
--from org --to org
) towhich is not valid org as jgm noted (only plain or para should appear on the bullet line).
This next one is also present in RST (the code was copied I guess): when a list item is empty, space is added after the item so that
"round trips" (
--from org --to org
) toThis is a suggestion that I think is related to item 2: currently, nested lists (even "tight" ones) are written with unnecessary newlines around them, like so:
maybe it is possible to write without such newlines (like the markdown writer).
The text was updated successfully, but these errors were encountered: