-
Notifications
You must be signed in to change notification settings - Fork 0
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
Generate wrong markdown headers for the preview of README.md #1
Labels
good first issue
Good for newcomers
Comments
It seems that if we remove the |
Reproduce this problem: HTML: <h1>Copy it as markdown</h1>
<p>Copy your selected text or page link in browser and turn it into markdown snippet!</p>
<p><a target="_blank" rel="noopener noreferrer" href="/nettee/copy-it-as-markdown/blob/master/img/menu-usage.jpg"><img src="/nettee/copy-it-as-markdown/raw/master/img/menu-usage.jpg" alt="Menu usage" style="max-width:100%;"></a></p>
<h2><a id="user-content-installation" class="anchor" aria-hidden="true" href="#installation"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Installation</h2>
<ul>
<li>Download the latest release <a href="https://github.com/nettee/copy-it-as-markdown/releases">here</a>, and unpack it.</li>
<li>Open <em>extensions</em> page chrome://extensions/ in Chrome.</li>
<li>Toggle on <strong>Developer mode</strong> on top right.</li>
<li>Click <strong>Load unpacked extension</strong> and choose the unpacked directory.</li>
</ul>
<h2><a id="user-content-usage" class="anchor" aria-hidden="true" href="#usage"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Usage</h2>
<p>Right-click on your web page to use it!</p> Markdown: # Copy it as markdown
Copy your selected text or page link in browser and turn it into markdown snippet!
[![Menu usage](</nettee/copy-it-as-markdown/raw/master/img/menu-usage.jpg>)](</nettee/copy-it-as-markdown/blob/master/img/menu-usage.jpg>)
## [<svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>
](<#installation>)Installation
- Download the latest release [here](<https://github.com/nettee/copy-it-as-markdown/releases>), and unpack it.
- Open *extensions* page chrome://extensions/ in Chrome.
- Toggle on **Developer mode** on top right.
- Click **Load unpacked extension** and choose the unpacked directory.
## [<svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>
](<#usage>)Usage
Right-click on your web page to use it! The GitHub page's source code: So, the html-to-markdown translating module is okay, but it is unexpected that GitHub inserts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I use it to generate the markdown file for the preview of README.md,
I get the following result. Everything goes well except the
Installation
header. It includes some unnecessary data, e.g. the <svg...> tag.The text was updated successfully, but these errors were encountered: