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

> However, Asciidoctor has never supported partially overlapping markup since it's invalid in XML/HTML anyway. 

Sylvain was just (un)lucky he chose a markup example that happened to produce valid (but different) HTML by accident :-)

> There's no definitive statement, but it's well understood by the community of users.

Ok, so as the Asciidoctor docs are the basis for the spec it just needs to be added to the list of things that need adding.  Its a pretty basic requirement that does need to be specified.

As I said, I would suggest just specifying overlaps are invalid and that it is up to implementations what they do about it.  

For recursive descent parsers there is no such thing as overlap, *foo _blah* foo_  is just `<bold>foo _blah</bold> foo_` where the _ before blah is simply an unmatched isolated constrained opening that is therefore just text and the _ after foo is another unmatched isolated constrained close that is also just text, a recursive definition never "sees" the underscored markup.  But it could potentially warn about those isolated markups being treated as text.  

Just a note that the current implementations already silently treat isolated markups within a paragraph as text if no match exists within the paragraph, so doing that is nothing new, all the recursive parser is doing is reducing that span from the whole paragraph to the nearest enclosing already detected markup.

Cheers
Lex

Back to the top