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

Code copied from the code block appears to be quoted unexpectedly #2044

Closed
1 task done
frapples opened this issue Apr 14, 2020 · 4 comments
Closed
1 task done

Code copied from the code block appears to be quoted unexpectedly #2044

frapples opened this issue Apr 14, 2020 · 4 comments

Comments

@frapples
Copy link

frapples commented Apr 14, 2020

Description

Code copied from the code block appears to be quoted unexpectedly

  • Can you reproduce the issue?

Steps to reproduce

  1. Open Marktext(version v0.16.1, windows 10)
  2. Input code block,the language is C++, eg:
std::map<int, int> map;
  1. Copy those code, Use the mouse to select and press Ctrl-c instead of clicking the copy button, and paste to notepad.

Expected behavior:
The content on the notepad is std::map<int, int> map;

Actual behavior:
The content on the notepad is std::map&lt;int, int&gt; map;

Link to an example: [optional]

Versions

  • Mark Text: v0.16.1
  • Operating system: windows 10
@gabrielegiammatteo
Copy link

It's happening also outside code blocks for me (v. 0.16.1 on Linux).

Peek 2020-04-20 14-14

It's really annoying because often I save bash commands with Marktext and I'd like to copy and paste them in the terminal directly.
I tried to fix this issue here gabrielegiammatteo@3960f42 by removing the invocation to escapeHtml(). It seems to work, but I don't know if this is the best way to fix it and which side effects it might have.

@gitvishy
Copy link

I'm seeing the same problem (v. 0.16.1 on Mac OS 10.14.6). Copy as plain text + pasting
grep "query" file.txt from a code block renders as

grep &quot;query&quot; file.txt

If I do the same in source code mode, it works as expected. But toggling back and forth between preview and source code mode is not ideal.

@xgdgsc
Copy link

xgdgsc commented May 27, 2020

I also see this. export CENV_PATH="/n1/env/" becomes export CENV_PATH=&quot;/n1/env/&quot;

@fxha
Copy link
Contributor

fxha commented Jun 6, 2020

Thank you for reporting the issue. We noticed that this is a duplicate of #1821. You may want to subscribe there for further updates.

@fxha fxha closed this as completed Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants