extend filename detection to not take spaces into account
This commit is contained in:
1 parent
9335b6d5da
commit
0d8970061e
1 file changed
+9
-1
@@ -87,7 +87,15 @@ class EvaluationWorkspace:
|
||||
"correction.tex": ("correction.tex", "corrige.tex", "corrigé.tex", f"{self.name}c.tex"),
|
||||
}
|
||||
names = aliases.get(canonical_name, (canonical_name,))
|
||||
return tuple(self.root / name for name in names)
|
||||
candidates = tuple(self.root / name for name in names)
|
||||
if canonical_name in aliases and self.root.is_dir():
|
||||
folder_alias = names[-1].replace(" ", "")
|
||||
candidates += tuple(
|
||||
path
|
||||
for path in sorted(self.root.iterdir())
|
||||
if path.name.replace(" ", "") == folder_alias and path not in candidates
|
||||
)
|
||||
return candidates
|
||||
|
||||
def resolve(self, relative_path: str) -> Path:
|
||||
"""Resolve a logical workspace path, including statement aliases."""
|
||||
|
||||
Reference in new issue
Block a user