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

Improve viewer behaviour on errors #951

Merged
merged 4 commits into from
May 16, 2024
Merged

Improve viewer behaviour on errors #951

merged 4 commits into from
May 16, 2024

Conversation

xjiang-at-wiris
Copy link
Contributor

Description

To alllow Viewers to accept multiple MathML inputs and not halt execution of remaining formulas if one MathML format encounters an error.

Steps to reproduce

  1. Visit https://htmledit.squarefree.com/
  2. Paste the following HTML, which contains a malformed mathml in the third equation:
<script src="https://integrations.wiris.kitchen/KB-43208/html/viewer/node_modules/@wiris/mathtype-viewer/dist/WIRISplugins.js?viewer=image"></script>
<h3>Hi! We're testing the Wiris viewer!</h3>

<p>LaTeX formula:
$$4 - 2 = 2$$
</p>
<p>MathML formula: <math xmlns="http://www.w3.org/1998/Math/MathML"><msqrt><mi>x</mi></msqrt></math></p>

<p>MathML formula:
<math>
<mn>2</mn>
<mo>+</mo>
mn>2</mn>
<mo=<s/mo>
<mn>4/mn
</math>
</p>
<p>LaTeX formula:
$$4 - 2 = 2$$
</p>
<p>MathML formula: <math xmlns="http://www.w3.org/1998/Math/MathML"><msqrt><mi>x</mi></msqrt></math></p>
  1. All formula (except the 3rd (problematic)) will be renderer

#taskid 43208

packages/viewer/src/mathml.ts Outdated Show resolved Hide resolved
packages/viewer/src/mathml.ts Outdated Show resolved Hide resolved
packages/viewer/src/mathml.ts Outdated Show resolved Hide resolved
Base automatically changed from KB-44942 to master April 23, 2024 15:21
Copy link
Contributor

@carla-at-wiris carla-at-wiris left a comment

Choose a reason for hiding this comment

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

I would mix the last two commits and rebase the code with master, since you have there one duplicated commit from master. Apart from that, the code looks great!

CHANGES.md Outdated Show resolved Hide resolved
xjiang-at-wiris and others added 4 commits May 16, 2024 16:02
Co-Authored-By: Jesus H. <79973396+jhernandez-at-wiris@users.noreply.github.com>
Co-Authored-By: Jose González <78553646+jgonzalez-at-wiris@users.noreply.github.com>
@carla-at-wiris carla-at-wiris merged commit 35271bc into master May 16, 2024
13 checks passed
@xjiang-at-wiris xjiang-at-wiris deleted the KB-43208 branch May 16, 2024 15:33
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.

None yet

4 participants