Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def look_for_hdl_urls(citation_elements):
"""Looks for handle identifiers that have already been identified as urls
When finding an hdl, creates a new HDL element.
@param citation_elements: (list) elements to process
"""
for el in citation_elements:
if el['type'] == 'URL':
match = re_hdl.match(el['url_string'])
if match:
el['type'] = 'HDL'
el['hdl_id'] = match.group('hdl_id')
del el['url_desc']
del el['url_string']