Closed mwette closed 7 years ago
I believe this may be related to issue #10.
Sorry the formatting didn't come out. I tried to insert as code but it didn't work correctly. I hope you can interpret what I suggested: adding another transfer with "application/xhtml+xml".
@mwette Thanks for your contribution. Can you submit it again as a github pull request?
Currently, get-mathml-source.js just uses an XMLSerializer to serialize the <math>
string. I think for the application/xhtml+xml flavor we should be stricter and ensure that we copy a well-formed XHTML document.
I am sorry. I can’t figure out the pull request right now (picking a different branch). I will look into it.
I the meantime I have attached the patch.
Matt
On May 27, 2016, at 2:19 AM, Frédéric Wang notifications@github.com wrote:
@mwette https://github.com/mwette Thanks for your contribution. Can you submit it again as a github pull request?
Currently, get-mathml-source.js just uses an XMLSerializer to serialize the
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fred-wang/Mathzilla/issues/36#issuecomment-222100303, or mute the thread https://github.com/notifications/unsubscribe/AEbr-M2fwkE9KZwBcj7s9fmqXo84bpPfks5qFrcxgaJpZM4IoEwg.
I have generated the pull request.
@mwette I don't know if you made any progress on this, but Mozilla is migrating to WebExtension format (https://blog.mozilla.org/addons/2017/02/16/the-road-to-firefox-57-compatibility-milestones/). As a consequence I've rewritten the addon from scratch and moved it to a separate repository.
This issue is moved to https://github.com/fred-wang/webextension-mathml-view-source/issues/5
Hi Fred,
I propose the attached patch for adding application/xhtml+xml to MathML copy.
Matt diff --git a/mathml-copy/lib/copy-mathml.js b/mathml-copy/lib/copy-mathml.js index d9b8dc2..2e2dffe 100644 --- a/mathml-copy/lib/copy-mathml.js +++ b/mathml-copy/lib/copy-mathml.js @@ -26,6 +26,11 @@ exports.copy = function(aMathMLCode) { transferable.addDataFlavor("text/html"); transferable.setTransferData("text/html", mathString, mathStringLength);