On Tue, 2005-06-07 at 01:46 +0200, Tomasz Wegrzanowski wrote:
On Tue, Jun 07, 2005 at 12:13:02AM +0100, Timwi
wrote:
Phil Boswell wrote:
If you set up an article with sections like this,
the auto-numbering gives
an incorrect result:
== 1
==== 1.1
==== 1.2
=== 1.1
=== 1.2
The auto-numbering assumes (quite reasonably) that the headings are
nested correctly. Garbage in, garbage out.
Couldn't we just add a hack to detect such problems ?
It would need to process headings twice before numbering,
but that shouldn't be much of a problem.
The cleanest fallback is to assume (and implicitly number) the missing
intermediate: The example above should be numbered
== 1
==== 1.1.1
==== 1.1.2
=== 1.2
=== 1.3
Thanks for the heads-up; I'll make sure it's properly specified
in the syntax. One of the major goals of a markup language for
non-technical users is robust and well-defined behavior regardless
of user mistakes.
--
Lee Daniel Crocker <lee at piclab.com> <http://www.piclab.com/lee/>
<http://creativecommons.org/licenses/publicdomain/>