@@ -61,22 +61,21 @@ limitations under the License.
61
61
child = child . nextElementSibling ) {
62
62
if ( child instanceof CxxSectionElement )
63
63
return para_num ;
64
- else if ( child instanceof HTMLParagraphElement &&
65
- ! child . classList . contains ( 'cont' ) )
66
- this . numberParagraph ( para_num ++ , child ) ;
64
+ else if ( child instanceof HTMLParagraphElement && ! child . classList . contains ( 'cont' ) )
65
+ para_num = this . numberParagraph ( para_num , child ) ;
67
66
else if ( child instanceof CxxFunctionElement ) {
68
- this . numberParagraph ( para_num ++ , child ) ;
67
+ para_num = this . numberParagraph ( para_num , child ) ;
69
68
para_num = this . numberParagraphChildren ( child , para_num ) ;
70
69
} else if ( child instanceof CxxFunctionAttributeElement )
71
- this . numberParagraph ( para_num ++ , child ) ;
70
+ para_num = this . numberParagraph ( para_num , child ) ;
72
71
}
73
72
return para_num ;
74
73
} ,
75
74
76
75
numberParagraph : function ( number , element ) {
77
76
// If the paragraph is explicitly numbered, use that number.
78
77
if ( element . hasAttribute ( "number" ) )
79
- number = element . getAttribute ( "number" )
78
+ number = Number ( element . getAttribute ( "number" ) )
80
79
81
80
var id = this . id + '.' + number ;
82
81
if ( element . id ) {
@@ -88,6 +87,7 @@ limitations under the License.
88
87
element . id = id ;
89
88
}
90
89
element . setAttribute ( 'para_num' , number ) ;
90
+ return number + 1
91
91
}
92
92
} )
93
93
} ) ( ) ;
0 commit comments