summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Rackham <srackham@methods.co.nz>2010-08-03 12:50:46 +1200
committerStuart Rackham <srackham@methods.co.nz>2010-08-03 12:50:46 +1200
commite19764acfa51bf5b7e70aff5f92a5abb60ae1b93 (patch)
treec8f7d0843d9970200603a92d6a5c84ec2afda494
parent83e039318357dd8a457d274f7f696d95a44c2053 (diff)
downloadasciidoc-e19764acfa51bf5b7e70aff5f92a5abb60ae1b93.tar.gz
The section numbers no longer increment when the 'numbered' attribute is undefined (see http://groups.google.com/group/asciidoc/browse_thread/thread/faa36e9e5c7da019/d24cab3fe363e58d).
-rwxr-xr-xasciidoc.py5
-rw-r--r--doc/article.txt2
2 files changed, 6 insertions, 1 deletions
diff --git a/asciidoc.py b/asciidoc.py
index 697934f..c4dbc51 100755
--- a/asciidoc.py
+++ b/asciidoc.py
@@ -2034,7 +2034,10 @@ class Section:
% (document.level+1, Title.level))
Section.set_id()
Section.setlevel(Title.level)
- Title.attributes['sectnum'] = Title.getnumber(document.level)
+ if 'numbered' in document.attributes:
+ Title.attributes['sectnum'] = Title.getnumber(document.level)
+ else:
+ Title.attributes['sectnum'] = ''
AttributeList.consume(Title.attributes)
stag,etag = config.section2tags(Title.sectname,Title.attributes)
Section.savetag(Title.level,etag)
diff --git a/doc/article.txt b/doc/article.txt
index eb2c53d..d892c86 100644
--- a/doc/article.txt
+++ b/doc/article.txt
@@ -11,6 +11,7 @@ NOTE: The abstract, preface, appendix, bibliography, glossary and
index section titles are significant ('specialsections').
+:numbered!:
[abstract]
Example Abstract
----------------
@@ -20,6 +21,7 @@ This document is an AsciiDoc article skeleton containing briefly
annotated element placeholders plus a couple of example index entries
and footnotes.
+:numbered:
The First Section
-----------------