]> granicus.if.org Git - python/commitdiff
Support environments {fulllineitems} and {classdesc}, more of the new logical
authorFred Drake <fdrake@acm.org>
Thu, 19 Feb 1998 15:20:30 +0000 (15:20 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 19 Feb 1998 15:20:30 +0000 (15:20 +0000)
markup.

The info generation now works, yet again.

Doc/partparse.py
Doc/tools/partparse.py

index 8fdd95b1dd263897e0ca78ce5dfc9fca04ebaed8..21e20fcd528ca8ddf28fffb0b87102d6df5fe574 100644 (file)
@@ -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':
index 8fdd95b1dd263897e0ca78ce5dfc9fca04ebaed8..21e20fcd528ca8ddf28fffb0b87102d6df5fe574 100644 (file)
@@ -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':