File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,28 +167,24 @@ InstallGlobalFunction( Scan_for_AutoDoc_Part,
167167 return AUTODOC_SplitCommandAndArgument( trimmed );
168168 end );
169169
170- # # Scans a string for <element > after <element_not_before_element > appeared.
170+ # # Scans a string for <char > after <not_before_char > appeared.
171171# # This is necessary to scan the filter list for method declarations
172172# # that contain \[\].
173173BindGlobal( " AUTODOC_PositionElementIfNotAfter" ,
174- function ( list, element, element_not_before_element )
175- local current_pos;
176- if not IsList( list ) then
177- Error( " <list> must be a list" );
178- fi ;
179- if Length( list ) > 0 and list[ 1 ] = element then
174+ function ( str, char, not_before_char )
175+ local pos;
176+ if Length( str ) > 0 and str[ 1 ] = char then
180177 return 1 ;
181178 fi ;
182179
183- for current_pos in [ 2 .. Length( list ) ] do
184- if list [ current_pos ] = element and list [ current_pos - 1 ] <> element_not_before_element then
185- return current_pos ;
180+ for pos in [ 2 .. Length( str ) ] do
181+ if str [ pos ] = char and str [ pos - 1 ] <> not_before_char then
182+ return pos ;
186183 fi ;
187184 od ;
188185 return fail ;
189186end );
190187
191-
192188# #
193189InstallGlobalFunction( AutoDoc_Type_Of_Item,
194190 function ( current_item, type, default_chapter_data )
You can’t perform that action at this time.
0 commit comments