PHPackages                             joyqi/hyper-down - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. joyqi/hyper-down

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

joyqi/hyper-down
================

A light weight markdown parser library

2.4.29(4y ago)1.3k9.5k220[19 issues](https://github.com/SegmentFault/HyperDown/issues)[3 PRs](https://github.com/SegmentFault/HyperDown/pulls)2BSD-4-ClausePHPPHP &gt;=7.1.0CI failing

Since Jan 20Pushed 11mo ago83 watchersCompare

[ Source](https://github.com/SegmentFault/HyperDown)[ Packagist](https://packagist.org/packages/joyqi/hyper-down)[ RSS](/packages/joyqi-hyper-down/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (23)Used By (2)Security (1)

为何要写这样一个解析器
===========

[](#为何要写这样一个解析器)

Markdown已经面世许多年了，国内外许多大大小小的网站都在用它，但是它的解析器却依然混乱不堪。SegmentFault 是中国较大规模使用 Markdown 语法的网站，我们一直在使用一些开源类库，包括但不限于

1. [php-markdown](https://github.com/michelf/php-markdown)
2. [CommonMark for PHP](https://github.com/thephpleague/commonmark)
3. [Parsedown](https://github.com/erusev/parsedown)

他们都有或多或少的毛病，有的性能较差，有的代码比较业余，更多的情况是由于Markdown本身解析比较复杂，因此我们几乎无法去维护另外一个人写的代码。基于这个原因，我为 SegmentFault 专门编写了这么一个Markdown解析器。

使用方法
----

[](#使用方法)

与常规的解析类库没有任何区别

```
$parser = new HyperDown\Parser;
$html = $parser->makeHtml($text);
```

当前支持的语法
-------

[](#当前支持的语法)

- 标题
- 列表（可递归）
- 引用（可递归）
- 缩进风格的代码块
- Github风格的代码块
- 各种行内文字加粗，斜体等效果
- 链接，图片
- 自动链接
- 段内折行
- 脚标
- 分隔符
- 表格
- 图片和链接支持互相套用

浏览器中使用请参阅 [HyperDown.js](https://github.com/SegmentFault/HyperDown.js)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

18

Last Release

1728d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3193b85fdd315ee1cd40b27c901d5c98ad24a6af4f68f8e5974f58eae0e39457?d=identicon)[joyqi](/maintainers/joyqi)

---

Top Contributors

[![joyqi](https://avatars.githubusercontent.com/u/59437?v=4)](https://github.com/joyqi "joyqi (167 commits)")[![kumfo](https://avatars.githubusercontent.com/u/7692591?v=4)](https://github.com/kumfo "kumfo (10 commits)")[![fenbox](https://avatars.githubusercontent.com/u/360618?v=4)](https://github.com/fenbox "fenbox (1 commits)")[![TechQuery](https://avatars.githubusercontent.com/u/19969570?v=4)](https://github.com/TechQuery "TechQuery (1 commits)")[![wtser](https://avatars.githubusercontent.com/u/2093743?v=4)](https://github.com/wtser "wtser (1 commits)")

---

Tags

markdownhyperdownsegmentfault

### Embed Badge

![Health badge](/badges/joyqi-hyper-down/health.svg)

```
[![Health](https://phpackages.com/badges/joyqi-hyper-down/health.svg)](https://phpackages.com/packages/joyqi-hyper-down)
```

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.0k155.2M839](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k426.1M936](/packages/league-commonmark)[michelf/php-markdown

PHP Markdown

3.5k53.8M370](/packages/michelf-php-markdown)[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k31.0M272](/packages/league-html-to-markdown)[cebe/markdown

A super fast, highly extensible markdown parser for PHP

1.0k33.5M146](/packages/cebe-markdown)[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84315.1M208](/packages/erusev-parsedown-extra)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
