
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
markdown-hashtag
Advanced tools
Extension for Python-Markdown to parse hashtag (e.g. #Python) into a user-defined URL
This is an extension for Python-Markdown to support hashtag parsing to clickable links.
# Heading
#hashtag at beginning of line and #within line.
This is no#hashtag.
#Markdown
will be rendered to:
<h1>Heading</h1>
<p>â <a class="hashtag" href="https://tags.example.com/hashtag">#hashtag</a> at beginning of line and <a class="hashtag" href="https://tags.example.com/within">#within</a> line.</p>
<p>This is no#hashtag. </p>
<p>â <a class="hashtag" href="https://tags.example.com/Markdown">#Markdown</a></p>
You can easily specify the used link prefix and the class name of the link, see # Usage below.
The markdown-hashtag package can be installed via:
pip install markdown-hashtag
The following python code example shows how to use the hashtag extension and style the hashtag links in a pretty way with CSS (similar to how Obsidian renderns hashtags).
Note that you can define the link prefix of the href attribute and the class name by defining extension_configs in the markdown.markdown() function, see example.
import markdown
text = """\
# Heading
#hashtag at beginning of line and #within line.
This is no#hashtag.
#Markdown
<style>
a.hashtag {
background-color: #e0e0e0; /* hellgrauer Hintergrund */
border-radius: 4px; /* abgerundete Ecken */
padding: 2px 6px; /* innen etwas Abstand */
color: #3b6ea5; /* blaue Farbe fĂźr Links */
text-decoration: none; /* keine Unterstreichung */
font-weight: 500; /* etwas fetter */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
cursor: pointer;
transition: background-color 0.2s ease;
}
a.hashtag:hover {
background-color: #cfd8dc; /* dunkleres Grau beim Hover */
text-decoration: underline; /* Unterstreichung beim Hover */
}
</style>
"""
html = markdown.markdown(text,
extensions=["hashtag"],
extension_configs={
"hashtag": {
"base_url": "https://tags.example.com/",
"span_class": "hashtag"
}
}
)
print(html)
The result looks like this:

This project is licensed under the terms of the GNU General Public License v3.0.
See the LICENSE file for details.
FAQs
Extension for Python-Markdown to parse hashtag (e.g. #Python) into a user-defined URL
We found that markdown-hashtag demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.