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

Broken bracketting when mfenced is not used #1

Open
MoMaT opened this issue Dec 29, 2020 · 1 comment
Open

Broken bracketting when mfenced is not used #1

MoMaT opened this issue Dec 29, 2020 · 1 comment

Comments

@MoMaT
Copy link

MoMaT commented Dec 29, 2020

When _use_fence is set to False* the open bracket is not generated correctly. The added mo is treated like mfenced and is made a parent rather than a sister of the subsequent elements.

self._append_el = element

A fix looks like this:

def _handle_open_fence(self, token):
    if self._use_fence:
        element = self._make_element('mfenced', open=token, separators='', close="")
        self._append_el.append(element)
        self._append_el = element
    else:
        element = self._make_element('mo', text=token)
        self._append_el.append(element)

*) mfenced is deprecated, and Firefox > 73 has dropped support for it
https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mfenced

@paulhtremblay
Copy link
Owner

OK. It has been so long since I looked at this code, so I will have to trust you. :) Do you want to make a branch and apply the patch?

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

No branches or pull requests

2 participants