heymenn commited on
Commit
2c75aef
·
1 Parent(s): 7eedaf8

fix parse cr cover issue

Browse files
Files changed (1) hide show
  1. scripts/fetch_crs.py +3 -1
scripts/fetch_crs.py CHANGED
@@ -266,6 +266,8 @@ def parse_cr_cover(docx_path: Path):
266
  if text:
267
  cells.append(text)
268
 
 
 
269
  spec_number = None
270
  version = None
271
 
@@ -275,7 +277,7 @@ def parse_cr_cover(docx_path: Path):
275
  spec_number = text
276
 
277
  # Look for version: cell immediately after "Current version:"
278
- if text == "Current version:" and i + 1 < len(cells):
279
  candidate = cells[i + 1]
280
  if VERSION_PATTERN.match(candidate):
281
  version = candidate
 
266
  if text:
267
  cells.append(text)
268
 
269
+ cells = list(dict.fromkeys(cells))
270
+
271
  spec_number = None
272
  version = None
273
 
 
277
  spec_number = text
278
 
279
  # Look for version: cell immediately after "Current version:"
280
+ if "Current version:" in text and i + 1 < len(cells):
281
  candidate = cells[i + 1]
282
  if VERSION_PATTERN.match(candidate):
283
  version = candidate