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

Wrapped <math> tag is not indented properly #2299

Open
ztomaszyk opened this issue Jul 24, 2024 · 1 comment
Open

Wrapped <math> tag is not indented properly #2299

ztomaszyk opened this issue Jul 24, 2024 · 1 comment

Comments

@ztomaszyk
Copy link

Description

Having math tag wrapped in some other html tag causes new lines and indentation issues. Both opening and closing math tags are in the same line as the wrapping tag. I am using html function with a default options in js script. Using Beautify HTML on https://beautifier.io/ page gives the same result.

Input

The code looked like this before beautification:

<div><math><mrow><munder><mo movablelimits="false">lim</mo><mrow><mi>n</mi><mo>→</mo><mi>N</mi></mrow></munder><mrow><mo>(</mo><mrow><mn>1</mn><mo>+</mo><mfrac><mn>1</mn><mi>n</mi></mfrac></mrow><mo>)</mo></mrow></mrow></math></div>

Expected Output

The code should have looked like this after beautification:

<div>
    <math>
        <mrow>
            <munder>
                <mo movablelimits="false">lim</mo>
                <mrow>
                    <mi>n</mi>
                    <mo>→</mo>
                    <mi>N</mi>
                </mrow>
            </munder>
            <mrow>
                <mo>(</mo>
                <mrow>
                    <mn>1</mn>
                    <mo>+</mo>
                    <mfrac>
                        <mn>1</mn>
                        <mi>n</mi>
                    </mfrac>
                </mrow>
                <mo>)</mo>
            </mrow>
        </mrow>
    </math>
</div>

Actual Output

The code actually looked like this after beautification:

<div><math>
        <mrow>
            <munder>
                <mo movablelimits="false">lim</mo>
                <mrow>
                    <mi>n</mi>
                    <mo>→</mo>
                    <mi>N</mi>
                </mrow>
            </munder>
            <mrow>
                <mo>(</mo>
                <mrow>
                    <mn>1</mn>
                    <mo>+</mo>
                    <mfrac>
                        <mn>1</mn>
                        <mi>n</mi>
                    </mfrac>
                </mrow>
                <mo>)</mo>
            </mrow>
        </mrow>
    </math></div>

Steps to Reproduce

  1. Go to https://beautifier.io/
  2. Paste following html in the editor:
<div><math><mrow><munder><mo movablelimits="false">lim</mo><mrow><mi>n</mi><mo>→</mo><mi>N</mi></mrow></munder><mrow><mo>(</mo><mrow><mn>1</mn><mo>+</mo><mfrac><mn>1</mn><mi>n</mi></mfrac></mrow><mo>)</mo></mrow></mrow></math></div>
  1. Select Beautify HTML from dropdown and click Beautify Code

Environment

OS: https://beautifier.io/

Settings

default ones with no additional settings

@AryaKS01
Copy link

I'm interested in doing it can u assign it to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants