Return 'table' if the caption label starts with 'Table', else 'figure'.
(label: str)
| 213 | |
| 214 | |
| 215 | def _classify_caption_kind(label: str) -> str: |
| 216 | """Return 'table' if the caption label starts with 'Table', else 'figure'.""" |
| 217 | return ( |
| 218 | "table" |
| 219 | if re.match(r"^(?:(?:supplementary|extended\s+data)\s+)?table\b", label.strip(), re.IGNORECASE) |
| 220 | else "figure" |
| 221 | ) |
| 222 | |
| 223 | |
| 224 | def parser() -> argparse.ArgumentParser: |
no outgoing calls