Skip to content

fix(reviewer): handle Anki 26.09 '/_anki/js/mathjax.js' - #22108

Open
david-allison wants to merge 2 commits into
ankidroid:mainfrom
david-allison:anki-26-09-2-part-5
Open

david-allison wants to merge 2 commits into
ankidroid:mainfrom
david-allison:anki-26-09-2-part-5

Conversation

@david-allison

Copy link
Copy Markdown
Member

Note

Assisted-by: GPT-6

Purpose / Description

Anki 26.09 adds /_anki/js/mathjax.js, this is not handled by our current MathJax vendoring

Fixes

Approach

  • Add a regression test
  • Fix the new URL

How Has This Been Tested?

Unit tests added

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@david-allison david-allison added the Review High Priority Request for high priority review label Sep 26, 2026
@david-allison

Copy link
Copy Markdown
Member Author
ViewerResourceHandlerTest > MathJax implementation is available at the backend URL FAILED
    org.opentest4j.AssertionFailedError: actual value is null ==> expected: not <null>
        at app//org.junit.jupiter.api.Assertions.assertNotNull(Assertions.java:345)
        at app//kotlin.test.junit5.JUnit5Asserter.assertNotNull(JUnitSupport.kt:48)
        at app//kotlin.test.AssertionsKt__AssertionsKt.assertNotNull(Assertions.kt:147)
        at app//kotlin.test.AssertionsKt.assertNotNull(Unknown Source)
        at app//kotlin.test.AssertionsKt__AssertionsKt.assertNotNull$default(Assertions.kt:145)
        at app//kotlin.test.AssertionsKt.assertNotNull$default(Unknown Source)
        at com.ichi2.anki.ViewerResourceHandlerTest.MathJax implementation is available at the backend URL(ViewerResourceHandlerTest.kt:54)

Forward slashes are used to the tests pass on Windows.

Part of 21926

Assisted-by: GPT-6
Anki 26.09 requests this file, previously:

* Vendored MathJax (/_anki/js/vendor/mathjax) was handled
* mathjax.js sat outside this directory

Part of 21926

Assisted-by: GPT-6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Review High Priority Request for high priority review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant