Recorrection GUI step ; LaTeX issues debugging
This commit is contained in:
1 parent
2d0f7a219f
commit
48602c24f1
12 files changed
+306
-8
No files matched your search
@@ -23,6 +23,14 @@ def read_json(path: str | Path, *, default: T | object = _MISSING) -> T:
|
||||
target = Path(path)
|
||||
try:
|
||||
with target.open("r", encoding="utf-8") as stream:
|
||||
if target.name == "refaire.json":
|
||||
# This user-edited selection supports whole-line // comments.
|
||||
# Preserve line numbers in JSON diagnostics and keep other JSON strict.
|
||||
text = "".join(
|
||||
"\n" if line.lstrip().startswith("//") else line
|
||||
for line in stream
|
||||
)
|
||||
return cast(T, json.loads(text))
|
||||
return cast(T, json.load(stream))
|
||||
except FileNotFoundError:
|
||||
if default is _MISSING:
|
||||
|
||||
Reference in new issue
Block a user