MathML with trailing linefeed fails to import

I’m using LO 5.1.0.3 on Windows 10.

In LibreOffice Math 5.1, there’s an “Import MathML from Clipboard” command. When I have MathML on the clipboard and choose this command, nothing happens. I’m getting the MathML from MathType, and knowing MathType sometimes includes extra empty lines (whitespace), I pasted the MathML into Notepad++ to see what it looked like. There were no lines of whitespace between open and close math tags, but there was an empty line after </math>.

Here’s the block of MathML I was using as an example:

<math xmlns='http://www.w3.org/1998/Math/MathML'>

    <mrow>

        <mi>x</mi><mo>+</mo><mi>y</mi></mrow>

</math>

If I remove that trailing linefeed, and just copy from the open <math> tag to the close </math> tag, the “Import MathML” command works as advertised. This seems to me to be a bug. Any reason I shouldn’t file it as such?

I filed this as bug #97990.

I have no problems with the trailing linefeed, if I copy the source from an editor. Perhaps there is something in the clipboard in addition in case of MathType? Have you looked at the clipboard with a clipboard viewer? I use here “Free Clipboard Viewer 2.0” for that purpose. Unfortunately I haven’t got MathType and so cannot test it as source.

Thanks for trying, Regina. Yes, I use ClipSpy. It shows 0D0A at the end of the MathML. If I copy from MathType and paste into either Notepad or Notepad++, then copy it from there, most of the time it’s successful. Sometimes I can get it to fail if copying from Notepad++, but it quite literally always fails from MathType. (There’s a free trial of MathType available.)