giovannihenriksen / Anki-Simulator

Simulator for Anki
GNU Affero General Public License v3.0
76 stars 11 forks source link

Accept both backslashes and slashes as path separators in web exports #37

Closed glutanimate closed 3 years ago

glutanimate commented 3 years ago

Starting with Anki 2.1.28 backslashes are now no longer supported, resulting in the graph view no longer loading on Windows machines.

This change replaces the previous os-specific path separators with a simple RegEx to match both regular slashes and backslashes.

By supporting both, the add-on should continue to work both on older versions of Anki that do require backslashes as path separators on Windows, and on 2.1.28+ where path separators have been unified to regular slashes.