File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -75,28 +75,35 @@ function print()
7575 if ( count ( $ this ->texts ) > 0 )
7676 $ this ->printCount ++;
7777
78- $ head = $ this ->filename . ': ' . $ this ->hash ( false ) . ': ' ;
79- $ mark = $ head . $ this ->hash ( true );
78+ // footer
79+
80+ $ markhead = $ this ->filename . ': ' . $ this ->hash ( false ) . ': ' ;
81+ $ markfull = $ markhead . $ this ->hash ( true );
8082 $ marks = OutputIgnoreArgv::cacheFile ()->load ( array () );
8183
8284 if ( $ this ->args ->showIgnore )
8385 {
84- if ( in_array ( $ mark , $ marks ) )
86+ // --add-ignore
87+
88+ if ( in_array ( $ markfull , $ marks ) )
8589 $ this ->texts = array ();
8690 else
87- $ this ->args ->pushAddIgnore ( $ this , $ mark );
91+ $ this ->args ->pushAddIgnore ( $ this , $ markfull );
92+
93+ // remove duplicates
8894
89- // old marks
90- while ( in_array ( $ mark , $ marks ) )
95+ while ( in_array ( $ markfull , $ marks ) )
9196 {
92- $ key = array_search ( $ mark , $ marks );
97+ $ key = array_search ( $ markfull , $ marks );
9398 unset( $ marks [$ key ] );
9499 }
100+
101+ // --del-ignore
102+
95103 foreach ( $ marks as $ mark )
96104 if ( $ mark != null )
97- if ( str_starts_with ( $ mark , $ head ) )
105+ if ( str_starts_with ( $ mark , $ markhead ) )
98106 $ this ->args ->pushDelIgnore ( $ this , $ mark );
99-
100107 }
101108
102109 $ this ->addLine ( "\n" );
You can’t perform that action at this time.
0 commit comments