Skip to content

Commit 4c2d3e8

Browse files
author
p12
committed
Transform/DDG: fix identifier name matching within declarations
1 parent 06a5d05 commit 4c2d3e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ddg_parse_html.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def get_declarations(root_el, name):
7878
code = code_els[0].text_content()
7979
code = re.sub('\n+', '\n', code)
8080

81-
if (code.find(name) == -1):
81+
if re.search('[^a-zA-Z0-9_]' + re.escape(name) + '[^a-zA-Z0-9_]',
82+
code) == None:
8283
ignored = True
8384
continue
8485

0 commit comments

Comments
 (0)