diff options
author | Fred Drake <fdrake@acm.org> | 1998-02-19 15:20:30 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-02-19 15:20:30 (GMT) |
commit | ef058037a590e10e8a7f26b069c17315ef119787 (patch) | |
tree | a3da6317cd40f9b67ed29551256a2fbb457ad149 | |
parent | c92740708d1ced7533dd225b395ca3afd293495e (diff) | |
download | cpython-ef058037a590e10e8a7f26b069c17315ef119787.zip cpython-ef058037a590e10e8a7f26b069c17315ef119787.tar.gz cpython-ef058037a590e10e8a7f26b069c17315ef119787.tar.bz2 |
Support environments {fulllineitems} and {classdesc}, more of the new logical
markup.
The info generation now works, yet again.
-rw-r--r-- | Doc/partparse.py | 19 | ||||
-rw-r--r-- | Doc/tools/partparse.py | 19 |
2 files changed, 14 insertions, 24 deletions
diff --git a/Doc/partparse.py b/Doc/partparse.py index 8fdd95b..21e20fc 100644 --- a/Doc/partparse.py +++ b/Doc/partparse.py @@ -1334,7 +1334,7 @@ def changeit(buf, pp): chunk(GROUP, ch.where, [])] length, i = length+2, i+2 - elif envname in ('itemize', 'list'): + elif envname in ('itemize', 'list', 'fulllineitems'): if hist.itemizenesting > len(itemizesymbols): raise error, 'too deep itemize nesting' if envname == 'list': @@ -1419,12 +1419,11 @@ def changeit(buf, pp): if length != len(pp): raise 'STILL, SOMETHING wrong', `i` - - elif envname in ('funcdesc', 'funcdescni'): + elif envname in ('funcdesc', 'funcdescni', 'classdesc'): pp.insert(i, chunk(PLAIN, ch.where, '')) i, length = i+1, length+1 length, i = do_funcdesc(length, buf, pp, i, - envname=="funcdesc") + envname[-2:] != "ni") elif envname == 'excdesc': pp.insert(i, chunk(PLAIN, ch.where, '')) @@ -1435,7 +1434,7 @@ def changeit(buf, pp): pp.insert(i, chunk(PLAIN, ch.where, '')) i, length = i+1, length+1 length, i = do_datadesc(length, buf, pp, i, - envname=="datadesc") + envname[-2:] != "ni") elif envname == 'opcodedesc': pp.insert(i, chunk(PLAIN, ch.where, '')) @@ -1472,7 +1471,7 @@ def changeit(buf, pp): chunk(GROUP, ch.where, [ chunk(PLAIN, ch.where, 'example')])] i, length = i+2, length+2 - elif envname in ('itemize', 'list'): + elif envname in ('itemize', 'list', 'fulllineitems'): hist.itemizenesting = hist.itemizenesting - 1 pp[i:i] = [chunk(CSLINE, ch.where, 'end'), chunk(GROUP, ch.where, [ @@ -1497,7 +1496,7 @@ def changeit(buf, pp): pp.insert(i, chunk(DENDLINE, ch.where, '\n')) i, length = i+1, length+1 - elif envname in ('funcdesc', 'excdesc', 'datadesc', + elif envname in ('funcdesc', 'excdesc', 'datadesc', 'classdesc', 'funcdescni', 'datadescni'): pp[i:i] = [chunk(CSLINE, ch.where, 'end'), chunk(GROUP, ch.where, [ @@ -1597,10 +1596,6 @@ def changeit(buf, pp): elif s_buf_data == 'program': ch.data = "strong" - elif s_buf_data == "fulllineitems": - del pp[i-1] - i, length = i-1, length-1 - elif s_buf_data == 'item': ch.chtype = chunk_type[CSLINE] length, newi = getoptarg(length, buf, pp, i) @@ -2093,7 +2088,7 @@ def changeit(buf, pp): elif s_buf_data in ('url', 'module', 'function', 'cfunction', 'keyword', 'method', 'exception', 'constant', - 'email', 'class'): + 'email', 'class', 'member', 'cdata', 'ctype'): ch.data = "code" elif s_buf_data == 'label': diff --git a/Doc/tools/partparse.py b/Doc/tools/partparse.py index 8fdd95b..21e20fc 100644 --- a/Doc/tools/partparse.py +++ b/Doc/tools/partparse.py @@ -1334,7 +1334,7 @@ def changeit(buf, pp): chunk(GROUP, ch.where, [])] length, i = length+2, i+2 - elif envname in ('itemize', 'list'): + elif envname in ('itemize', 'list', 'fulllineitems'): if hist.itemizenesting > len(itemizesymbols): raise error, 'too deep itemize nesting' if envname == 'list': @@ -1419,12 +1419,11 @@ def changeit(buf, pp): if length != len(pp): raise 'STILL, SOMETHING wrong', `i` - - elif envname in ('funcdesc', 'funcdescni'): + elif envname in ('funcdesc', 'funcdescni', 'classdesc'): pp.insert(i, chunk(PLAIN, ch.where, '')) i, length = i+1, length+1 length, i = do_funcdesc(length, buf, pp, i, - envname=="funcdesc") + envname[-2:] != "ni") elif envname == 'excdesc': pp.insert(i, chunk(PLAIN, ch.where, '')) @@ -1435,7 +1434,7 @@ def changeit(buf, pp): pp.insert(i, chunk(PLAIN, ch.where, '')) i, length = i+1, length+1 length, i = do_datadesc(length, buf, pp, i, - envname=="datadesc") + envname[-2:] != "ni") elif envname == 'opcodedesc': pp.insert(i, chunk(PLAIN, ch.where, '')) @@ -1472,7 +1471,7 @@ def changeit(buf, pp): chunk(GROUP, ch.where, [ chunk(PLAIN, ch.where, 'example')])] i, length = i+2, length+2 - elif envname in ('itemize', 'list'): + elif envname in ('itemize', 'list', 'fulllineitems'): hist.itemizenesting = hist.itemizenesting - 1 pp[i:i] = [chunk(CSLINE, ch.where, 'end'), chunk(GROUP, ch.where, [ @@ -1497,7 +1496,7 @@ def changeit(buf, pp): pp.insert(i, chunk(DENDLINE, ch.where, '\n')) i, length = i+1, length+1 - elif envname in ('funcdesc', 'excdesc', 'datadesc', + elif envname in ('funcdesc', 'excdesc', 'datadesc', 'classdesc', 'funcdescni', 'datadescni'): pp[i:i] = [chunk(CSLINE, ch.where, 'end'), chunk(GROUP, ch.where, [ @@ -1597,10 +1596,6 @@ def changeit(buf, pp): elif s_buf_data == 'program': ch.data = "strong" - elif s_buf_data == "fulllineitems": - del pp[i-1] - i, length = i-1, length-1 - elif s_buf_data == 'item': ch.chtype = chunk_type[CSLINE] length, newi = getoptarg(length, buf, pp, i) @@ -2093,7 +2088,7 @@ def changeit(buf, pp): elif s_buf_data in ('url', 'module', 'function', 'cfunction', 'keyword', 'method', 'exception', 'constant', - 'email', 'class'): + 'email', 'class', 'member', 'cdata', 'ctype'): ch.data = "code" elif s_buf_data == 'label': |