File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 55from argparse import ArgumentParser
66from indexer import parse_lpsc_from_path
77import re
8- from utils import canonical_name
8+ from utils import canonical_name , canonical_target_name
99
1010# Functions to perform reference removal (assumes [n] reference style)
1111# Written by Karanjeet Singh
@@ -187,9 +187,13 @@ def read_records(self, in_file):
187187 }
188188 for child in children :
189189 if 'name' in child :
190- child ['can_name' ] = canonical_name (child ['name' ])
190+ if child ['type' ] == 'target' :
191+ child ['can_name' ] = canonical_target_name (child ['name' ])
192+ else :
193+ child ['can_name' ] = canonical_name (child ['name' ])
191194 if 'target_names_ss' in child :
192- child ['target_names_ss' ] = map (canonical_name , child ['target_names_ss' ])
195+ child ['target_names_ss' ] = map (canonical_target_name ,
196+ child ['target_names_ss' ])
193197 if 'cont_names_ss' in child :
194198 child ['cont_names_ss' ] = map (canonical_name , child ['cont_names_ss' ])
195199 yield child
You can’t perform that action at this time.
0 commit comments