mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
fix: round 2 audit fixes, updated emulator profiles
Scripts: - fix generate_site nav regex destroying mkdocs.yml content - fix auto_fetch comma-separated MD5 in find_missing - fix verify print_platform_result conflating untested/missing - fix validate_pr path traversal and symlink check - fix batocera_scraper brace counting and escaped quotes in strings - fix emudeck_scraper hash search crossing function boundaries - fix pipeline.py cwd to repo root via Path(__file__) - normalize SHA1 comparison to lowercase in generate_pack Emulator profiles: - emux_gb/nes/sms: reclassify from alias to standalone profiles - ep128emu: remove .info-only files not referenced in source - fbalpha2012 variants: full source-verified profiles - fbneo_cps12: add new profile
This commit is contained in:
@@ -101,14 +101,26 @@ class Scraper(BaseScraper):
|
||||
start = match.start() + raw[match.start():].index("{")
|
||||
depth = 0
|
||||
i = start
|
||||
in_str = False
|
||||
str_ch = None
|
||||
while i < len(raw):
|
||||
if raw[i] == "{":
|
||||
ch = raw[i]
|
||||
if in_str:
|
||||
if ch == '\\':
|
||||
i += 2
|
||||
continue
|
||||
if ch == str_ch:
|
||||
in_str = False
|
||||
elif ch in ('"', "'"):
|
||||
in_str = True
|
||||
str_ch = ch
|
||||
elif ch == "{":
|
||||
depth += 1
|
||||
elif raw[i] == "}":
|
||||
elif ch == "}":
|
||||
depth -= 1
|
||||
if depth == 0:
|
||||
break
|
||||
elif raw[i] == "#":
|
||||
elif ch == "#":
|
||||
while i < len(raw) and raw[i] != "\n":
|
||||
i += 1
|
||||
i += 1
|
||||
@@ -120,10 +132,15 @@ class Scraper(BaseScraper):
|
||||
in_string = False
|
||||
string_char = None
|
||||
clean = []
|
||||
for j, ch in enumerate(line):
|
||||
if ch in ('"', "'") and j > 0 and line[j - 1] == '\\':
|
||||
j = 0
|
||||
while j < len(line):
|
||||
ch = line[j]
|
||||
if ch == '\\' and j + 1 < len(line):
|
||||
clean.append(ch)
|
||||
elif ch in ('"', "'") and not in_string:
|
||||
clean.append(line[j + 1])
|
||||
j += 2
|
||||
continue
|
||||
if ch in ('"', "'") and not in_string:
|
||||
in_string = True
|
||||
string_char = ch
|
||||
clean.append(ch)
|
||||
@@ -134,6 +151,7 @@ class Scraper(BaseScraper):
|
||||
break
|
||||
else:
|
||||
clean.append(ch)
|
||||
j += 1
|
||||
lines.append("".join(clean))
|
||||
|
||||
clean_dict_str = "\n".join(lines)
|
||||
|
||||
Reference in New Issue
Block a user