Skip to content

AsciiDoc writer: Support for roles with Block elements #11363

@yanntrividic

Description

@yanntrividic

Hello,

Thank you for all the work on the AsciiDoc writer, and now on the reader as well. That's fantastic to have both of them now!

A feature that would be super great to have in the writer, in my opinion, would be element attributes. Currently, the support for this is limited, as most Block elements can only carry identifiers, and inlines can only have identifiers and roles.

For example, when I input this in the Pandoc-flavored Markdown reader:

# Header {#identifier .class .class key=value key=value}

::::: {#special .sidebar}
Here is a paragraph.

And another.
:::::

This is a [class]{.class #test key=value}.

I get this AsciiDoc output:

[[identifier]]
== Header

[[special]]
Here is a paragraph.

And another.

This is a [#test .class]#class#.

(We can also appreciate a bug here, as the [[special]] identifier only applies to the first paragraph.) Edit: As noted in the next two messages, I was not using the latest version, hence this bug.

AsciiDoc has different types of element attributes, and even though all of them are useful, it feels to me that the most interesting one currently missing is the role attribute for Block elements, which is parsed as a class by Asciidoctor.

I think this might be a bit too hard of a problem for me, so I am not sure if I will be able to help, but I would definitely be thankful if somebody had the motivation to have a look at this issue!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions