Merge pull request #619 from evandroforks/fix_empty_sound_tags

Also fix legacy.py::anki.sound._soundReg accepting empty tags
This commit is contained in:
Damien Elmes 2020-05-18 19:31:22 +10:00 committed by GitHub
commit e323a8f902
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,6 +41,6 @@ def fmtTimeSpan(time, pad=0, point=0, short=False, inTime=False, unit=99):
def install_pylib_legacy() -> None: def install_pylib_legacy() -> None:
anki.utils.bodyClass = bodyClass # type: ignore anki.utils.bodyClass = bodyClass # type: ignore
anki.utils.fmtTimeSpan = fmtTimeSpan # type: ignore anki.utils.fmtTimeSpan = fmtTimeSpan # type: ignore
anki.sound._soundReg = r"\[sound:(.*?)\]" # type: ignore anki.sound._soundReg = r"\[sound:(.+?)\]" # type: ignore
anki.sound.allSounds = allSounds # type: ignore anki.sound.allSounds = allSounds # type: ignore
anki.sound.stripSounds = stripSounds # type: ignore anki.sound.stripSounds = stripSounds # type: ignore