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

Wrongly translated list continuation in nested lists #118

Closed
Vampire opened this issue Mar 11, 2024 · 4 comments
Closed

Wrongly translated list continuation in nested lists #118

Vampire opened this issue Mar 11, 2024 · 4 comments
Labels

Comments

@Vampire
Copy link

Vampire commented Mar 11, 2024

If you have the Markdown

- foo
    - bar
        - baz

      bam

bam continues bar.

This currently is converted to the AsciiDoc

* foo
 ** bar
  *** baz

+
bam

where bam continues foo instead.

It should instead be

* foo
 ** bar
  *** baz

+
bam

+
{empty}

or the imho less nice

* foo
 ** bar
+
--
  *** baz
--
+
bam
@mojavelinux
Copy link
Member

mojavelinux commented Mar 12, 2024

Regarding this output:

* foo
 ** bar
  *** baz

+
bam

This is the correct result. The single empty line changes the attachment from baz to bar, which is what it should be doing based on the example you provided.

However, it appears that Asciidoctor is converting it incorrectly. The issue here is actually with Asciidoctor core (which is not too much of a surprise since list parsing in Asciidoctor is still very problematic). We shouldn't change kramdown-asciidoc because Asciidoctor is doing something wrong.

or the imho less nice

kramdown-asciidoc is not going to use open blocks to attach blocks to list items. It's too complex and breaks down if more than one level is needed.

@Vampire
Copy link
Author

Vampire commented Mar 12, 2024

Oh, I see.
From what eskwayrd said on Zulip, I understood the opposite.
Can you move this issue to the asciidoctor repo then?
Of course Kramdoc should not be changed to adapt to an Asciidoctor bug.

@mojavelinux
Copy link
Member

I would prefer if the issue were resubmitted since the description pertains to Kramdown AsciiDoc and thus would not transfer well.

@mojavelinux
Copy link
Member

It turns out there is already an issue for this, and has been known for years. See asciidoctor/asciidoctor#2353

In order to fix this, list parsing has to be rewritten in Asciidoctor. This is something we are studying in the AsciiDoc Language. Once we figure it out, the new parsing logic will be put into Asciidoctor.

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

No branches or pull requests

2 participants