-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
svg_preview: Detect SVG in single-file mode by checking file name #45747
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
svg_preview: Detect SVG in single-file mode by checking file name #45747
Conversation
Use the files full path and file name as fallbacks when the worktree-relative path is empty, so SVG previews and the toolbar button work in single-file mode.
MrSubidubi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this! I think we can simplify this, left a comment below.
Also, not required, but could I interest you into looking to add a test case for this? You might need to copy quite some code for this from elsewhere (and even need to add the test elsewhere). Yet, with a test, we'd be more certain this does not regress any time soon (and I think changes here need to be done at some point, so would be nice to have, but as mentioned, not required). Thanks!
MrSubidubi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you both for the fix as well as the fast follow up! Appreciated
…d-industries#45747) Release Notes: - Use the files name for "is svg" checks so SVG previews and the toolbar button work in single-file mode.
…5747) Release Notes: - Use the files name for "is svg" checks so SVG previews and the toolbar button work in single-file mode.
…d-industries#45747) Release Notes: - Use the files name for "is svg" checks so SVG previews and the toolbar button work in single-file mode.
…d-industries#45747) Release Notes: - Use the files name for "is svg" checks so SVG previews and the toolbar button work in single-file mode.
Release Notes: