Skip to content

Conversation

@rtibbles
Copy link
Member

Summary

  • I mistakenly believed that Perseus' markdown processing handled the image dimension addition we had made to the markdown, whereas in fact this only gets used in our backend and nowhere else.
  • Fixes this by adding a regression test that this is always removed, and simplifying our image replacement behaviour to always do this (and not just for QTI export, as my previous fix had done: Fix image export in QTI exercise publishing #5316)
  • Cleans up the previous special casing for this, and simplifies our image replacement flow to just do a single pass using re.sub.

References

Fixes #5398

Reviewer guidance

Do the changes make sense, is the existing test coverage adequate to guard against regressions, is the regression coverage added in this PR adequate to prevent this in future?

Copy link
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes make sense to me! Test should be able to guard against any regressions. Thanks @rtibbles

@akolson akolson merged commit 9d8ecf4 into learningequality:hotfixes Sep 22, 2025
14 checks passed
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.

2 participants