PHPackages                             youyiio/beyong-markdown - 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. youyiio/beyong-markdown

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

youyiio/beyong-markdown
=======================

PHP markdown parse, base on parsedown.

v1.0.3(3y ago)18MITPHPPHP &gt;=5.3.0

Since Aug 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/youyiio/beyong-markdown)[ Packagist](https://packagist.org/packages/youyiio/beyong-markdown)[ Docs](https://www.beyongx.com)[ RSS](/packages/youyiio-beyong-markdown/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (1)Versions (4)Used By (0)

Extension for PHP markdown parse, base on parsedown. ()
===================================================================================================

[](#extension-for-php-markdown-parse-base-on-parsedown-httpsgithubcomyouyiiobeyong-markdown)

> Configurable Markdown to HTML converter with Parsedown Extra.

Table of Content
----------------

[](#table-of-content)

- [1. Installation](#installation)
- [2. Features](#features)
    - [HTML or XHTML](#html-or-xhtml)
    - [Predefined Abbreviations](#predefined-links)
    - [Predefined Links](#predefined-links)
    - [Automatic `rel="nofollow"` Attribute on External Links](#automatic-relnofollow-attribute-on-external-links)
    - [Custom Code Class Format](#custom-code-class-format)
    - [Custom Code Text Format](#custom-code-text-format)
    - [Put `` Attributes on `` Element](#put-code-attributes-on-pre-element)
    - [Custom Table Class](#custom-table-class)
    - [Custom Table Alignment Class](#custom-table-alignment-class)
    - [Custom Footnote ID Format](#custom-footnote-id-format)
    - [Custom Footnote Back ID Format](#custom-footnote-back-id-format)
    - [Custom Footnote Class](#custom-footnote-class)
    - [Custom Footnote Link Class](#custom-footnote-link-class)
    - [Custom Footnote Back Link Class](#custom-footnote-back-link-class)
    - [Custom Footnote Link Text](#custom-footnote-link-text)
    - [Custom Footnote Back Link Text](#custom-footnote-back-link-text)
    - [Advance Attribute Parser](#advance-attribute-parser)
    - [Code Block Class Without `language-` Prefix](#code-block-class-without-language--prefix)

Installation
------------

[](#installation)

```
composer require youyiio/beyong-markdown:^1.0

```

usage

```
use beyong\markdown\ParsedownExtraPlugin;
use beyong\markdown\ParsedownExtra;

$parser = new ParsedownExtraPlugin();

// settings ...
$parser->code_class = 'lang-%s';

echo $parser->text('# Header {.sth}');
```

Features
--------

[](#features)

### HTML or XHTML

[](#html-or-xhtml)

```
$parser->element_suffix = '>'; // HTML5
```

### Predefined Abbreviations

[](#predefined-abbreviations)

```
$parser->abbreviations = array(
    'CSS' => 'Cascading Style Sheet',
    'HTML' => 'Hyper Text Markup Language',
    'JS' => 'JavaScript'
);
```

### Predefined Links

[](#predefined-links)

```
$parser->links = array(
    'mecha-cms' => array(
        'url' => 'http://mecha-cms.com',
        'title' => 'Mecha CMS'
    ),
    'test-image' => array(
        'url' => 'http://example.com/favicon.ico',
        'title' => 'Test Image'
    )
);
```

### Automatic `rel="nofollow"` Attribute on External Links

[](#automatic-relnofollow-attribute-on-external-links)

```
// custom link attributes
$parser->links_attr = array();

// custom external link attributes
$parser->links_external_attr = array(
    'rel' => 'nofollow',
    'target' => '_blank'
);

// custom image attributes
$parser->images_attr = array(
    'alt' => ""
);

// custom external image attributes
$parser->images_external_attr = array();
```

### Custom Code Class Format

[](#custom-code-class-format)

```
$parser->code_class = 'language-%s';
```

```
$parser->code_class = function($text) {
    return trim(str_replace('.', ' ', $text));
};
```

### Custom Code Text Format

[](#custom-code-text-format)

```
$parser->code_text = '%s';
$parser->code_block_text = '%s';
```

```
$parser->code_text = function($text) {
    return do_syntax_highlighter($text);
};

$parser->code_block_text = function($text) {
    return do_syntax_highlighter($text);
};
```

### Put `` Attributes on `` Element

[](#put-code-attributes-on-pre-element)

```
$parser->code_block_attr_on_parent = true;
```

### Custom Table Class

[](#custom-table-class)

```
$parser->table_class = 'table-bordered';
```

### Custom Table Alignment Class

[](#custom-table-alignment-class)

```
$parser->table_align_class = 'text-%s';
```

### Custom Footnote ID Format

[](#custom-footnote-id-format)

```
$parser->footnote_link_id = 'cite_note:%s';
```

### Custom Footnote Back ID Format

[](#custom-footnote-back-id-format)

```
$parser->footnote_back_link_id = 'cite_ref:%s-%s';
```

### Custom Footnote Class

[](#custom-footnote-class)

```
$parser->footnote_class = 'footnotes';
```

### Custom Footnote Link Class

[](#custom-footnote-link-class)

```
$parser->footnote_link_class = 'footnote-ref';
```

### Custom Footnote Back Link Class

[](#custom-footnote-back-link-class)

```
$parser->footnote_back_link_class = 'footnote-backref';
```

### Custom Footnote Link Text

[](#custom-footnote-link-text)

```
$parser->footnote_link_text = '[%s]';
```

```
$parser->footnote_link_text = function($text) {
    return '[' . $text . ']';
};
```

### Custom Footnote Back Link Text

[](#custom-footnote-back-link-text)

```
$parser->footnote_back_link_text = '';
```

### Advance Attribute Parser

[](#advance-attribute-parser)

- `{#foo}` → ``
- `{#foo#bar}` → ``
- `{.foo}` → ``
- `{.foo.bar}` → ``
- `{#foo.bar.baz}` → ``
- `{#foo .bar .baz}` → `` (white-space before `#` and `.` becomes optional in my extension)
- `{foo="bar"}` → ``
- `{foo="bar baz"}` → ``
- `{foo='bar'}` → ``
- `{foo='bar baz'}` → ``
- `{foo=bar}` → ``
- `{foo=}` → ``
- `{foo}` → ``
- `{foo=bar baz}` → ``
- `{#a#b.c.d e="f" g="h i" j='k' l='m n' o=p q= r s t="u#v.w.x y=z"}` → ``

### Code Block Class Without `language-` Prefix

[](#code-block-class-without-language--prefix)

Dot prefix in class name are now becomes optional, custom attributes syntax also acceptable:

- `php` → ``
- `php html` → ``
- `.php` → ``
- `.php.html` → ``
- `.php html` → ``
- `{.php #foo}` → ``

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~683 days

Total

3

Last Release

1100d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0eb11d31135ed8017f5ff6b9decccf7d0cff9cf2a665ae973e5beffb032bad48?d=identicon)[cattong](/maintainers/cattong)

---

Top Contributors

[![youyiio](https://avatars.githubusercontent.com/u/49471274?v=4)](https://github.com/youyiio "youyiio (1 commits)")

---

Tags

parsermarkdownbeyongxbeyong

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/youyiio-beyong-markdown/health.svg)

```
[![Health](https://phpackages.com/badges/youyiio-beyong-markdown/health.svg)](https://phpackages.com/packages/youyiio-beyong-markdown)
```

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.0k151.8M725](/packages/erusev-parsedown)[league/commonmark

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

2.9k404.0M698](/packages/league-commonmark)[erusev/parsedown-extra

An extension of Parsedown that adds support for Markdown Extra.

84314.8M192](/packages/erusev-parsedown-extra)[parsedown/parsedown

Parser for Markdown.

21342.8k3](/packages/parsedown-parsedown)[tovic/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5933.7k](/packages/tovic-parsedown-extra-plugin)[taufik-nurrohman/parsedown-extra-plugin

Configurable Markdown to HTML converter with Parsedown Extra.

5932.3k](/packages/taufik-nurrohman-parsedown-extra-plugin)

PHPackages © 2026

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