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

<pre> is not converted to ``` #77

Open
alexanderadam opened this issue Nov 10, 2020 · 3 comments
Open

<pre> is not converted to ``` #77

alexanderadam opened this issue Nov 10, 2020 · 3 comments
Assignees

Comments

@alexanderadam
Copy link

alexanderadam commented Nov 10, 2020

Actual Result

  1. Go to https://atom.io/packages/markdown-table-calc
  2. Copy the description
  3. Paste it somewhere
| Column A | Column B | Column C |

|:---------|:---------|:---------|

| 123      | 456      | 789      |

| 0        | 0        | 0        |

&lt;!--TBLFM C2=A1+A2; C1=56*78/4 --&gt;

Copying with copy selection as markdown

Expected Result

```
| Column A | Column B | Column C |
|:---------|:---------|:---------|
| 123      | 456      | 789      |
| 0        | 0        | 0        |
<!--TBLFM C2=A1+A2; C1=56*78/4 -->
```

PS: I'm not sure but is the < vs &lt; thingy also a bug or expected? Because I have the option Replace angle brackets (<>) with HTML entities disabled and it still shows up as HTML entities.

PPS:

This is the underlying HTML in case the page is removed someday (Click to show code)
<pre class="editor editor-colors"><div class="line"><span class="source gfm"><span>|&nbsp;Column&nbsp;A&nbsp;|&nbsp;Column&nbsp;B&nbsp;|&nbsp;Column&nbsp;C&nbsp;|</span></span></div><div class="line"><span class="source gfm"><span>|:---------|:---------|:---------|</span></span></div><div class="line"><span class="source gfm"><span>|&nbsp;123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;456&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;789&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></span></div><div class="line"><span class="source gfm"><span>|&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></span></div><div class="line"><span class="source gfm"><span class="comment block gfm"><span class="punctuation definition comment gfm"><span>&lt;!--</span></span><span>TBLFM&nbsp;C2=A1+A2;&nbsp;C1=56*78/4&nbsp;</span><span class="punctuation definition comment gfm"><span>--&gt;</span></span></span></span></div></pre>
@0x6b
Copy link
Owner

0x6b commented Nov 11, 2020

@alexanderadam: appreciate your efforts to report this. It's interesting. At this moment Turndown treats only <pre><code>...</code></pre> as code block. Let me see how I can address your use case, but due to my recent situation it'll take some time. Thanks!

@alexanderadam
Copy link
Author

due to my recent situation it'll take some time

that's absolutely no problem! Always keep in mind that time outside of FOSS projects and your health are most important, too!
So really no pressure on that.

@lamyergeier
Copy link

@0x6b I observed same behaviour in Managing Logging in Systemd - Selectel Blog. pre tag is not getting parsed!

This Chome extension: https://chrome.google.com/webstore/detail/copy-as-markdown/dgoenpnkphkichnohepecnmpmihnabdg, successfully is able to parse it. Github: JohnnyFee/CopyAsMarkdown: This is a Chrome Extension used to copy the element in current page as markdown format.

Just wanted to let you know if you wanted to see how they have implemented it.

@0x6b 0x6b self-assigned this Apr 3, 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

3 participants