Skip to content

Conversation

@yanntrividic
Copy link

This PR is the direct result of what has been discussed first on #10665, and then on #10932. This proposition is basically a cleaner version based on the previous contribution attempts.

More details on what this PR cover can be found in #10665 (comment). @jgm, for reminders, you had a comment there, which I addressed but that didn't get an answer.

Hopefully, this try is the right one! (And sorry again for the messy contribution.)

This commits adds a getRoleAttr function to get
the value from the role attribute of a DocBook
element.
This value is then added to the returned Pandoc
object by using addPandocAttributes.
Sections have to be considered in a different way
than regular blocks and inlines.
In this case, we wrap the content in a Div element
with a `section` class and a `level` attribute in
addition to the `role` attribute.
See this comment: d097c64
And see the code review in
jgm#10932
Elements parsed with withOptionalTitle do not
automatically get the role attributes transfered
to them. This covers this problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant