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

Hi, I'm also trying to implement AsciiDoc and I will explain my findings, doubts, design decisions, etc, when I see fit.

By the way, I'm very happy to see this standardization effort in motion and very grateful to all the people pushing for it!

El 9/3/21 a las 12:41, Lex Trotman escribió:
> [...]

Whilst the computer doesn't care so long as the lengths are different and match I wonder if purely for humans a restriction should be introduced that the length must increase with greater nesting, that way it is the same as sections and lists?  Or perhaps an advice and a note that it may become a requirement in version 2.0, I guess it depends on how many documents really use the smaller length for nested.

Only to clarify: lists in Asciidoctor work in a similar (and allegedly unintuitive) fashion than (nested) blocks. Every marker inside an open list that is different from the previous marker (and, recursively, to all its parents) is interpreted as increasing the nesting level. A somewhat convoluted example:

*** item
** sub-item
* sub-sub-item
** sub-item
- sub-sub-item
* sub-sub-sub-item

I wouldn't change this behavior (for lists and blocks) for v1.0. In my experience, it's not significantly more difficult (even easier in my case, recursive descendant parser) to parse this than a version that requires increasing marker lengths.

Linters could advice against decreasing marker lengths or block markers with odd length. Even we could include a number of warnings as part of the standard if we agree those constructs harm readability (for me they clearly do).



Back to the top