Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [asciidoc-lang-dev] Markup for nested blocks

> Sylvain wrote:
> my question mostly was: "is this an _intended_ behavior, or should we consider the document as non-conforming?" you can feed `asciidoctor` with many forms of invalid documents...

Understood. Fair point.

> Lex wrote:
> Reorganising the writer's input markup doesn't seem to be the thing to have a spec require.  I would simply document overlapping markups as not legal and leave what happens as implementation defined, some may reorganise to get something that is legal in a particular output, some may give an error.

I agree that trying to assert the outcome of invalid markup is not necessary and would bog down the spec and TCK. Particularly with a lightweight markup, there will always be some creative way to get it to produce invalid markup. We should focus on what is correct syntax and ensure that all implementations interpret it correctly. If we do add negative assertions, they should be selected strategically.

> there is nothing I can find in the new Asciidoctor docs that says anything about nesting of markups anyway.

Asciidoctor followed AsciiDoc.py on this and allows nested markup where the rx-based substitutor could handle it. For example https://docs.asciidoctor.org/asciidoc/latest/text/italic/#mixing-italic-with-other-formatting and https://docs.asciidoctor.org/asciidoc/latest/text/bold/#mixing-bold-with-other-formatting. And those are critical to support*. However, Asciidoctor has never supported partially overlapping markup since it's invalid in XML/HTML anyway. There's no definitive statement, but it's well understood by the community of users.

Best Regards,

-Dan

* The inline parser may free us from having to worry about the nesting order. The limitation is a constraint of the rx-based substitutor.

--
Dan Allen, Vice President | OpenDevise Inc.
Pronouns: he, him, his
Content ∙ Strategy ∙ Community
opendevise.com

Back to the top