Skip to content

Commit 61a389d

Browse files
authored
Merge pull request #55 from trishullab/usr/amit9oct/fixed-theorem-name
Fixed theorem name match regex.
2 parents 7ff0287 + 7a8ada0 commit 61a389d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ requires = [
55
build-backend = "hatchling.build"
66
[project]
77
name = "itp_interface"
8-
version = "1.1.10"
8+
version = "1.1.11"
99
authors = [
1010
{ name="Amitayush Thakur", email="[email protected]" },
1111
]

src/itp_interface/tools/lean4_sync_executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class Lean4SyncExecutor:
3030
# We ONLY support proofs which are written in tactic mode i.e. with := syntax
3131
theorem_endings = r"(:=|(\|[\S|\s]*=>))"
3232
theorem_end_regex = r"(theorem|lemma|example)([\s|\S]*?)(:=|=>)"
33-
theorem_regex = r"((((theorem|lemma)[\s]+([\S]*))|example)([\S|\s]*?)(:=|=>)[\s]*?)[\s]+"
34-
theorem_name_regex = r"(((theorem|lemma)[\s]+([\S]*))|example)"
33+
theorem_regex = r"((((theorem|lemma)[\s]+([^\s:]*))|example)([\S|\s]*?)(:=|=>)[\s]*?)[\s]+"
34+
theorem_name_regex = r"(((theorem|lemma)[\s]+([^\s:]*))|example)"
3535
remove_proof_regex = r"([\s|\S]*(:=|\|))[\s|\S]*?"
3636
proof_context_separator = "⊢"
3737
proof_context_regex = r"((\d+) goals)*([\s|\S]*?)\n\n"

0 commit comments

Comments
 (0)