Skip to content

Commit

Permalink
fix regex in chapters
Browse files Browse the repository at this point in the history
  • Loading branch information
astaff committed Jul 12, 2024
1 parent 81b3ca9 commit 0441281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platogram/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def get_chapter(passage_marker: int) -> int | None:
if args.chapters:
current_chapter = None
for passage in content.passages:
passage_markers = [int(m) for m in re.findall(r"\d+", passage)]
passage_markers = [int(m) for m in re.findall(r"【(\d+)】", passage)]
chapter_marker = get_chapter(passage_markers[0])
if chapter_marker is not None and chapter_marker != current_chapter:
passages += f"### {content.chapters[chapter_marker]}\n\n"
Expand Down

0 comments on commit 0441281

Please sign in to comment.