Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 28 days 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 (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-09-26T15:42:43.000Z (about 2 years ago)
- Last Synced: 2024-10-04T20:37:09.558Z (about 1 month ago)
- Topics: adhocore, htmlup, markdown, markdown-parser, markdown-to-html, php, php-markdown-parser
- Language: PHP
- Homepage:
- Size: 77.1 KB
- Stars: 50
- 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
[![Latest Version](https://img.shields.io/github/release/adhocore/htmlup.svg?style=flat-square)](https://github.com/adhocore/htmlup/releases)
[![Travis Build](https://img.shields.io/travis/adhocore/htmlup/master.svg?style=flat-square)](https://travis-ci.org/adhocore/htmlup?branch=master)
[![Scrutinizer CI](https://img.shields.io/scrutinizer/g/adhocore/htmlup.svg?style=flat-square)](https://scrutinizer-ci.com/g/adhocore/htmlup/?branch=master)
[![Codecov branch](https://img.shields.io/codecov/c/github/adhocore/htmlup/master.svg?style=flat-square)](https://codecov.io/gh/adhocore/htmlup)
[![StyleCI](https://styleci.io/repos/20793745/shield)](https://styleci.io/repos/20793745)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Donate 15](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square&label=donate+15)](https://www.paypal.me/ji10/15usd)
[![Donate 25](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square&label=donate+25)](https://www.paypal.me/ji10/25usd)
[![Donate 50](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square&label=donate+50)](https://www.paypal.me/ji10/50usd)
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](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)