https://github.com/adhocore/htmlup
Light and fast markdown parser, that parses markdown in a way human does
https://github.com/adhocore/htmlup
adhocore htmlup markdown markdown-parser markdown-to-html php php-markdown-parser
Last synced: 3 months ago
JSON representation
Light and fast markdown parser, that parses markdown in a way human does
- Host: GitHub
- URL: https://github.com/adhocore/htmlup
- Owner: adhocore
- License: mit
- Created: 2014-06-13T05:59:19.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-09-26T15:42:43.000Z (almost 3 years ago)
- Last Synced: 2025-04-15T06:17:32.594Z (3 months ago)
- Topics: adhocore, htmlup, markdown, markdown-parser, markdown-to-html, php, php-markdown-parser
- Language: PHP
- Homepage:
- Size: 77.1 KB
- Stars: 51
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## adhocore/htmlup
[](https://github.com/adhocore/htmlup/releases)
[](https://travis-ci.org/adhocore/htmlup?branch=master)
[](https://scrutinizer-ci.com/g/adhocore/htmlup/?branch=master)
[](https://codecov.io/gh/adhocore/htmlup)
[](https://styleci.io/repos/20793745)
[](LICENSE)
[](https://www.paypal.me/ji10/15usd)
[](https://www.paypal.me/ji10/25usd)
[](https://www.paypal.me/ji10/50usd)
[](https://twitter.com/intent/tweet?text=Lightweight+and+fast+markdown+to+HTML+parser+for+PHP&url=https://github.com/adhocore/htmlup&hashtags=php,markdown,markdownparser,phpmarkdown)`htmlup` is ultra lightweight and uber speedy markdown to html parser written in PHP.
**Concept** - it splits the markdown into lines and parses to markup one by one, finally applies markdown syntaxes on the markup.
It supports most of the markdown as in [specs](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet "cheatsheet").# installation
Run `composer require adhocore/htmlup`
# usage
```php
parse($markdownText);
```# features
## nesting
It provides limited support to deep nested elements, supported items are:
- lists inside lists
- blockquotes inside blockcodes
- lists inside blockquotes## raw html
you can throw in your raw html but with a blank line at start and end to delimit the block at like so-
```html
-
A
- Apple
- B
-
Ball
```
## table
supports [GFM table syntax](https://help.github.com/articles/github-flavored-markdown/#tables), example:
```
a | b | c
--- |----| ---
1 | 2 |3
4| 5 | 6
```
is rendered as:
a | b | c
--- |----| ---
1 | 2 |3
4| 5 | 6
# todo
- make robust, and provide full support of spec
- ~~handle markdown table syntax~~
- **markdown extra** however, is _not planned_ :(
## contributing
- fork and pull request for patch/fix
- create issue for _breaking_ bugs and severe markdown spec violation
- please check [the guide](./CONTRIBUTING.md)
## license
> © 2014-2018 | **Jitendra Adhikari** | [MIT](./LICENSE)