(text: str)
| 842 | |
| 843 | |
| 844 | def image_embed_caption_issues(text: str) -> list[dict[str, object]]: |
| 845 | issues: list[dict[str, object]] = [] |
| 846 | lines = text.splitlines() |
| 847 | for idx, line in enumerate(lines): |
| 848 | stripped = line.strip() |
| 849 | if not is_image_embed_line(stripped): |
| 850 | continue |
| 851 | if idx + 1 < len(lines) and is_italic_caption_line(lines[idx + 1]): |
| 852 | continue |
| 853 | issues.append( |
| 854 | { |
| 855 | "line_number": idx + 1, |
| 856 | "line": stripped, |
| 857 | "reason": "inserted_figure_missing_caption", |
| 858 | } |
| 859 | ) |
| 860 | return issues |
| 861 | |
| 862 | |
| 863 | def figure_structure_issues(text: str) -> list[dict[str, object]]: |
no test coverage detected