Closed dominik-oktav closed 3 weeks ago
Hi everyone,
Any updates on the PR?
Also, is there a reason the regex (?:\r?\n){1,}[-]{1,}(?:\r?\n){1,}
is not used? (It is either \n
for Linux or \r\n
for Windows)
And in general it would be great to merge any solution that works as the issue may potentially block eager Windows-using contributors to Ultimate Geography repo (and any other using brain_brew). Not everyone is able to debug Python code and figure out the root cause of the issue (let alone to fix it locally).
Also, is there a reason the regex (?:\r?\n){1,}[-]{1,}(?:\r?\n){1,} is not used? (It is either \n for Linux or \r\n for Windows)
I suspect that the slightly more general regex was chosen because technically, there are/were systems where just \r
is/was used. (Classic MacOS if I remember correctly.) This is probably more relevant in situations where one has to handle old text files, though; here, I expect we will never encounter such files since Anki itself is younger than the unix-based MacOS. OTOH it doesn't really hurt.
Lovely, thanks all. I’ll give it a quick test on Windows tomorrow night, then make a release shortly thereafter.
As reported in #51, the current regex doesn't work on Windows. I adapted the regex to allow
\r\n
,\n
and\r
.