Mathjax on the same line causes period breaks to a new line

Hi guys,
I noticed that sometimes if the line in a post has reached some length X and has a comma or period, the comma/period will break to a new line. For example if the long line is

Discourse had a great website.

The output will be:

Discourse has a great webaite

This is not quite a good example to reporduce the big but it just shows whatโ€™s the but is.

Iโ€™ll try to reproduce it here:

Test number 1 - text text texttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt.
Test number 2 - text text texttttttttttttttttttttttttt.
Test number 2 - text text texttttttttttttttttttttttttttttttt.

Edit: it does not happen here. It usually happens when I use mathjax of the same line. If someone wants to see a live example, please PM me

1 Like

This is 100% going to be mathjax specific so I have edited your title to reflect that.

You should show us a repro with the mathjax please.

1 Like

Yes I think you are right. Thanks for the edit.
It looks like meta discourse does not have Mathjax. So if someone wants to see a live example, please PM me, Iโ€™ll send him the links (prefer to keep the website private for now).
Thanks again


Canโ€™t you post the mathjax here in a code block? I donโ€™t understand why that canโ€™t be shared?


The line:

ื‘. ืฉื™ื ืœื‘ ืฉื”ืžืจื•ื‘ืข $ABGE$ ื”ื•ื ืžืงื‘ื™ืœื™ืช ื•ืœื›ืŸ ืžืชืงื™ื™ื $AE=BG$, ื ืชื•ืŸ ืฉ- $AE=GF$, ื˜ืจื ื–ื™ื˜ื™ื‘ื™ืช ืžืชืงื‘ืœ $BG=GF$ ื•ืœื›ืŸ $\triangle GBF$ ื”ื•ื ืžืฉื•ืœืฉ ืฉื•ื•ื” ืฉื•ืงื™ื™ื.



Thanks again :slight_smile:


Hi guys, any news about this bug? :slight_smile:

Do you know if the issue is only happening when your locale is set to a RTL language?

In the screenshot that you posted, where should the period be appearing?

1 Like

Our community is RTL so unfortunately I havenโ€™t got to play with LTR so I donโ€™t know if the issue happens in that case.

In the screenshot that I posted the comma should be right after $AE=GF$. I believe that the comma should be comprssed to the first line or all of โ€œ$AE=GF$,โ€ should be on the next line.

When I add that text to a LTR site, Iโ€™m seeing the following:

ื‘. ืฉื™ื ืœื‘ ืฉื”ืžืจื•ื‘ืข $ABGE$ ื”ื•ื ืžืงื‘ื™ืœื™ืช ื•ืœื›ืŸ ืžืชืงื™ื™ื $AE=BG$, ื ืชื•ืŸ ืฉ- $AE=GF$, ื˜ืจื ื–ื™ื˜ื™ื‘ื™ืช ืžืชืงื‘ืœ $BG=GF$ ื•ืœื›ืŸ $\triangle GBF$ ื”ื•ื ืžืฉื•ืœืฉ ืฉื•ื•ื” ืฉื•ืงื™ื™ื.

When I replace the Hebrew with English and leave in some random punctuation, I get:

This is, $ABGE$ a test. $AE=BG$, This is only a test. $AE=GF$, this is only a test. lets see what happens $\triangle GBF$ test.

The English version seems correct to me. The Hebrew version seems to be wrong.


Iโ€™m not sure I understand what do you mean. In LTR the comma should be on the right side and in RTL it should be on the left side. Both of the versions look ok becuase the box is wide open. The issue happens when the box breaks (adds new line) between the formula and the comma (try to play with the width of the window and see if its breaks between the formula and the comma).
Thank you for your help :slight_smile:

Yes, that seems to cause the problem:


Iโ€™m assuming that the issue is related to how my browser (Chrome) is handling the markup.

1 Like