notlmn / copy-as-markdown

🖱 Browser extension to copy hyperlinks, images, and selected text as Markdown with GFM support
MIT License
312 stars 45 forks source link

Copying Markdown from a web page and pasting it into a note causes extra characters to appear. #38

Open zhouxinghong opened 7 months ago

zhouxinghong commented 7 months ago

Copying Markdown from a web page and pasting it into a note causes extra characters to appear. Chrome 120 | FireFox 120 Windows 10 19044 Extension latest version

The sample web page content is as follows:

<html><body>
<!--StartFragment--><strong>型号:</strong>
   <span class="value"><a href="https://www.zol.com.cn/BMO_codes/BMO">BMO</a>-593</span>
   
  <div class="panel-block">
  <strong>上市日期:</strong>
   <span class="value">2022-10-25</span>
</div>
<div class="panel-block">
  <strong>长度:</strong>
   <span class="value">125 公分</span>
</div><!--EndFragment-->
</body>
</html>

Steps to reproduce:

  1. Use the extension to copy the above code into Markdown;
  2. Paste into Markdown notes;
  3. If you look at the actual effect, there will be extra characters;

image Hello! Is there any way to prevent this extra character from appearing after pasting it into a note?