-
Notifications
You must be signed in to change notification settings - Fork 433
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
[#3111] fix markdown rendering applying before mathjax rendering #3112
Conversation
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.
+1 thanks @AndreaBarbasso ! I have tested with and without this functionality and can reproduce the problem and confirm the fix. The code changes all look good to me.
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-7_x
git worktree add -d .worktree/backport-3112-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-3112-to-dspace-7_x
git switch --create backport-3112-to-dspace-7_x
git cherry-pick -x 66e1a2488b14c84b41486fabc77350f17d722b0d |
Successfully created backport PR for |
@AndreaBarbasso @tdonohue i realised after merging that the 7.x backport will have to be done quite manually - the services and components used in mathjax rendering appear to be quite different compared to 8.x+ |
@kshepherd and @AndreaBarbasso : Per our Support Policy, we only guarantee bug fixes to the most recent major release (currently 8.x). So, that means we require bug-fix backporting to 8.x (where possible to do so), but bug-fix backports to 7.x are optional, unless it's a serious bug/security issue. That said, I've been making a "best effort" to try and backport things to 7.x where it's "reasonable to do so", just because so many sites are still on 7.x. So, this is all to say that I'd also welcome a 7.x backport, but it's not required. |
References
Description
With this PR, LaTeX formulas are rendered with mathjax before any markdown rendering is applied. This fixes unwanted behaviors described on the linked issue.
Instructions for Reviewers
List of changes in this PR:
nativeWindow
injection inclient-math.service
(since it's a Client-Side-Rendering service, there is no need to use the injection);$$
delimiter in the list of approved delimiters.To test this PR, try to use this text in any place where the markdown rendering is enabled:
...measurements in (EDT-TTF-CONH$_2$)$_2^{+}$[BABCO$^{-}$] (EDT-BCO) confirmed the absence...
.It should render fine, instead of showing a broken formula and some italic text.
Checklist
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.