npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dbushell/hmmarkdown

v0.11.0

Published

Hmmarkdown is a HTML-aware Markdown parser and renderer.

Downloads

664

Readme

🤔 Hmmarkdown

JSR NPM

Hmmarkdown is a HTML-aware Markdown parser and renderer. Hmmarkdown is as fast as everything else. If you need faster stop using JavaScript.

⚠️ Work in progress! ⚠️

Cons

  • Opinionated; limited syntax support
  • Unforgiving; no affordance for errors
  • Unstable; refactored on a whim

Pros

  • Accepts a string or stream (e.g. Response.body)
  • Processes some HTML-in-Markdown and Markdown-in-HTML
  • Asynchronous plugin and filter architecture
  • MIT licensed / zero-dependency

Development

Hmmarkdown is under active development. It is not stable or "production ready" — although I am testing in production (on my website).

Block Syntax

Only the following Markdown syntax is supported for now because it's all I need. If you need alternate or additional syntax use another Markdown library.

Blockquote

> This is a blockquote.
> Blockquotes can have multiple lines.
> <cite>[Some name](https://example.com)</cite>

Lines must start with a > greater-than sign followed by a single space.

Consecutive lines form new paragraphs within the same blockquote.

Heading

# Heading level one
## Level two
### Level three
#### Level four
##### Level five
###### Level six

Line must start with 1–6 # hash characters followed by a single space before the heading.

Horizontal Rule

* * *

Any three asterisks, hyphens, or underscores will render a <hr> element.

Spaces between characters are optional. Spaces around characters are not allowed.

Image

![alternate description](https://example.com/image.jpg)

![alt](%20%28image%29.jpg) — URL spaces and parentheses must be URL encoded.

Alternate text cannot include square brackets ([ or ]).

<img alt="" src="https://example.com/image.jpg">

HTML image tags are passed through the same renderer and filter.

Unordered List

* List item one
    Indented second line
* List item two
* List item three

New lines within an item are indented with exactly four spaces.

Ordered List

1. List item one
    Indented second line
2. List item two
3. List item three

Paragraph

This will become a paragraph.
<div>
  This will also become a paragraph.
</div>

Plain text is wrapped in <p> paragraph tags.

Preformatted

```html
<h1>Hello, World!</h1>
```

Exactly three backticks followed by an optional language name.

Inline Markdown

Anchor

[example link](https://example.com/slug%20%28parentheses%29/)

URL spaces and parentheses must be URI encoded.

Code

Text between `backticks` is wrapped in `<code>`.

Deleted

Text between ~~double tilde~~ is wrapped in `<del>`.

Emphasis

Text between *single asterisk* is wrapped in `<em>`.

Strong

Text between **double asterisk** is wrapped in `<strong>`.

HTML and Inline Markdown

Text content within a subset of HTML tags will have inline Markdown parsed.

<p>These words **are strong**.</p>

Will render:

<p>These words <strong>are strong</strong>.</p>

Inline Markdown with HTML inside is not parsed.

These words **<span>are not strong</span>**.

Will render:

<p>These words **<span>are not strong</span>**.</p>

Void elements and a subset of elements like iframe and video are left untouched and text content within is not parsed.

Nested Markdown blocks are not supported, e.g. lists in blockquotes, lists in lists, etc.

Configuration

Documentation coming soon (maybe lol).


MIT License | Copyright © 2024 David Bushell