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

Copy to Clipboard > Tex commands doesn't trim newlines #2574

Closed
falsandtru opened this issue Nov 26, 2020 · 1 comment
Closed

Copy to Clipboard > Tex commands doesn't trim newlines #2574

falsandtru opened this issue Nov 26, 2020 · 1 comment

Comments

@falsandtru
Copy link

Issue Summary

Show Math As > Tex commands > Copy to Clipboard trims \n but Copy to Clipboard > Tex commands doesn't. Both commands should trim \n.

Steps to Reproduce:

      displayMath: [['$$', '$$']],
$$
E = mc^2
$$
  1. Right click.
  2. Click Copy to Clipboard > Tex commands.
  3. The copied text has \n at the first and the last.

Any other information you want to share that is relevant to the issue
being reported. Especially, why do you consider this to be a bug? What
do you expect to happen instead?

Technical details:

  • MathJax Version: 3.1.2
  • Client OS: Win10
  • Browser: Chrome 85.0.4183.121

Supporting information:

  • Please supply a link to a (live) minimal example page, when possible.
  • If your issue is with the display of the mathematics produced by MathJax, include a screen snapshot that illustrates the problem, when possible.
  • Check your browser console window for any error messages, and in crude them here.
  • Include the MathJax configuration you are using, and the script tag that loads MathJax itself.

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.1.2/es5/tex-chtml.min.js" integrity="sha512-OEN4O//oR+jeez1OLySjg7HPftdoSaKHiWukJdbFJOfi2b7W0r0ppziSgVRVNaG37qS1f9SmttcutYgoJ6rwNQ==" crossorigin="anonymous"></script>

@falsandtru falsandtru changed the title Copy to Clipboard doesn't trim whitespace Copy to Clipboard > Tex commands doesn't trim whitespace Nov 26, 2020
@falsandtru falsandtru changed the title Copy to Clipboard > Tex commands doesn't trim whitespace Copy to Clipboard > Tex commands doesn't trim newlines Nov 26, 2020
@dpvc
Copy link
Member

dpvc commented Nov 30, 2020

Thanks for the suggestion. it makes sense to do the trimming for the clipboard.

@dpvc dpvc added this to the 3.1.3 milestone Feb 1, 2021
@dpvc dpvc self-assigned this Feb 1, 2021
dpvc added a commit to mathjax/MathJax-src that referenced this issue Mar 18, 2021
@dpvc dpvc removed their assignment Mar 18, 2021
dpvc added a commit to mathjax/MathJax-src that referenced this issue Mar 19, 2021
Trim TeX and annotations before copying to clipboard.  (mathjax/MathJax#2574)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Mar 19, 2021
@dpvc dpvc added Fixed v3.1 and removed Merged Merged into develop branch labels Apr 27, 2021
@dpvc dpvc closed this as completed Apr 27, 2021
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

2 participants