Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean O'Brien committed Feb 19, 2024
1 parent 8a5a1b0 commit 7da1c81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ jobs:
for encoding in encodings:
try:
with open(file_path, 'r', encoding=encoding) as f:
sourceCode = f.read()
source_code = f.read()
break
except UnicodeDecodeError:
continue
pattern = r'(function\s+\w+\([^)]*\))\s*:\s*?\??\w+(\s*\n\s*\{|;)'
match = re.search(pattern, sourceCode)
match = re.search(pattern, source_code)
if match:
def replace_function(match):
return match.group(1) + " {\n" if '{' in match.group(2) else match.group(1) + ';'
Expand Down

0 comments on commit 7da1c81

Please sign in to comment.