File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed
Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export default class ParseOptions {
150150 this . root = null ;
151151 this . nodeLists = { } ;
152152 this . error = false ;
153- this . tags . reset ( ) ;
153+ this . tags . resetTag ( ) ;
154154 }
155155
156156
Original file line number Diff line number Diff line change @@ -162,11 +162,16 @@ export interface Tags {
162162 clearTag ( ) : void ;
163163
164164 /**
165- * Resets the tag structure.
165+ * Resets the tag structure after an expression has been typeset.
166+ */
167+ resetTag ( ) : void ;
168+
169+ /**
170+ * Fully resets the tag structure, in particular all the tagging and label
171+ * history.
166172 * @param {number } offset A new offset value to start counting ids from.
167- * @param {boolean } keep If sets, keep all previous labels and ids at reset.
168173 */
169- reset ( offset ?: number , keep ?: boolean ) : void ;
174+ reset ( offset ?: number ) : void ;
170175
171176 /**
172177 * Finalizes tag creation.
@@ -405,14 +410,19 @@ export class AbstractTags implements Tags {
405410 /**
406411 * @override
407412 */
408- public reset ( n : number = 0 , keepLabels : boolean = true ) {
409- this . offset = n ;
413+ public resetTag ( ) {
410414 this . history = [ ] ;
411415 this . clearTag ( ) ;
412- if ( ! keepLabels ) {
413- this . labels = { } ;
414- this . ids = { } ;
415- }
416+ }
417+
418+ /**
419+ * @override
420+ */
421+ public reset ( offset : number = 0 ) {
422+ this . resetTag ( ) ;
423+ this . offset = offset ;
424+ this . labels = { } ;
425+ this . ids = { } ;
416426 }
417427
418428 /**
You can’t perform that action at this time.
0 commit comments