Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognise and check for media referenced in <source> tags #3763

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iamllama
Copy link
Contributor

@iamllama iamllama commented Jan 23, 2025

Relevant post: https://forums.ankiweb.net/t/problem-unused-media-when-exporting-front-back-fields

The media referenced in <audio controls><source src="blah.mp3" /></audio> isn't currently seen by anki and when doing media checks or exporting, it's treated as unused and isn't exported

Its use is sometimes preferred over [sound:...] when trying to avoid audio autoplay

This pr fixes that by updating the relevant regex, and testing shows that any file referenced by a <source> tag is now correctly identified as being used and exported in apkgs

EDIT: the added test is probably overkill

@iamllama iamllama force-pushed the media-html-source-tag branch from 56c7475 to 349e24c Compare January 23, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant