This might be a moot issue, since in recent versions of Anki (2.1.43 tested) it seems that all such control characters (including \n) are already filtered out from deck names, but I don't think it hurts.
\n will be double-counted, but I think it's best to keep it explicitly for readability (and since we're using a set, duplication doesn't matter).
The join takes just 5 μs, so I think replacing it with the "computed" string is not worth the drop in readability.
Fix #147.
Unlike Linux, Windows doesn't allow ASCII control characters (codepoint < 32) in filenames. See:
https://stackoverflow.com/a/31976060/6598435
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions
For consistency, we should remove them always.
This might be a moot issue, since in recent versions of Anki (2.1.43 tested) it seems that all such control characters (including \n) are already filtered out from deck names, but I don't think it hurts.
\n will be double-counted, but I think it's best to keep it explicitly for readability (and since we're using a set, duplication doesn't matter).
The
join
takes just 5 μs, so I think replacing it with the "computed" string is not worth the drop in readability.