Skip to content

Commit

Permalink
Merge pull request #898 from mathjax/issue2993
Browse files Browse the repository at this point in the history
Handle newlines as spaces in text mode. (mathjax/MathJax#2993)
  • Loading branch information
dpvc authored Feb 13, 2023
2 parents 54920a9 + bfcbb22 commit 4464efc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ts/input/tex/ParseUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ namespace ParseUtil {
*/
export function internalText(parser: TexParser, text: string, def: EnvList): MmlNode {
// @test Label, Fbox, Hbox
text = text.replace(/^\s+/, entities.nbsp).replace(/\s+$/, entities.nbsp);
text = text.replace(/\n+/g, ' ').replace(/^\s+/, entities.nbsp).replace(/\s+$/, entities.nbsp);
let textNode = parser.create('text', text);
return parser.create('node', 'mtext', [], def, textNode);
}
Expand Down

0 comments on commit 4464efc

Please sign in to comment.