Parser for Markdown and Markdown Extra derived from the original Markdown.pl by John Gruber.

Related tags

Markup php-markdown
Overview

PHP Markdown

PHP Markdown Lib 1.9.0 - 1 Dec 2019

by Michel Fortin
https://michelf.ca/

based on Markdown by John Gruber
https://daringfireball.net/

Introduction

This is a library package that includes the PHP Markdown parser and its sibling PHP Markdown Extra with additional features.

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

"Markdown" is actually two things: a plain text markup syntax, and a software tool, originally written in Perl, that converts the plain text markup to HTML. PHP Markdown is a port to PHP of the original Markdown program by John Gruber.

Requirement

This library package requires PHP 5.3 or later.

Note: The older plugin/library hybrid package for PHP Markdown and PHP Markdown Extra is no longer maintained but will work with PHP 4.0.5 and later.

Before PHP 5.3.7, pcre.backtrack_limit defaults to 100 000, which is too small in many situations. You might need to set it to higher values. Later PHP releases defaults to 1 000 000, which is usually fine.

Usage

To use this library with Composer, first install it with:

$ composer require michelf/php-markdown

Then include Composer's generated vendor/autoload.php to enable autoloading:

require 'vendor/autoload.php';

Without Composer, for autoloading to work, your project needs an autoloader compatible with PSR-4 or PSR-0. See the included Readme.php file for a minimal autoloader setup. (If you cannot use autoloading, see below.)

With class autoloading in place:

use Michelf\Markdown;
$my_html = Markdown::defaultTransform($my_text);

Markdown Extra syntax is also available the same way:

use Michelf\MarkdownExtra;
$my_html = MarkdownExtra::defaultTransform($my_text);

If you wish to use PHP Markdown with another text filter function built to parse HTML, you should filter the text after the transform function call. This is an example with PHP SmartyPants:

use Michelf\Markdown, Michelf\SmartyPants;
$my_html = Markdown::defaultTransform($my_text);
$my_html = SmartyPants::defaultTransform($my_html);

All these examples are using the static defaultTransform static function found inside the parser class. If you want to customize the parser configuration, you can also instantiate it directly and change some configuration variables:

use Michelf\MarkdownExtra;
$parser = new MarkdownExtra;
$parser->fn_id_prefix = "post22-";
$my_html = $parser->transform($my_text);

To learn more, see the full list of configuration variables.

Usage without an autoloader

If you cannot use class autoloading, you can still use include or require to access the parser. To load the Michelf\Markdown parser, do it this way:

require_once 'Michelf/Markdown.inc.php';

Or, if you need the Michelf\MarkdownExtra parser:

require_once 'Michelf/MarkdownExtra.inc.php';

While the plain .php files depend on autoloading to work correctly, using the .inc.php files instead will eagerly load the dependencies that would be loaded on demand if you were using autoloading.

Public API and Versioning Policy

Version numbers are of the form major.minor.patch.

The public API of PHP Markdown consist of the two parser classes Markdown and MarkdownExtra, their constructors, the transform and defaultTransform functions and their configuration variables. The public API is stable for a given major version number. It might get additions when the minor version number increments.

Protected members are not considered public API. This is unconventional and deserves an explanation. Incrementing the major version number every time the underlying implementation of something changes is going to give nonessential version numbers for the vast majority of people who just use the parser. Protected members are meant to create parser subclasses that behave in different ways. Very few people create parser subclasses. I don't want to discourage it by making everything private, but at the same time I can't guarantee any stable hook between versions if you use protected members.

Syntax changes will increment the minor number for new features, and the patch number for small corrections. A new feature is something that needs a change in the syntax documentation. Note that since PHP Markdown Lib includes two parsers, a syntax change for either of them will increment the minor number. Also note that there is nothing perfectly backward-compatible with the Markdown syntax: all inputs are always valid, so new features always replace something that was previously legal, although generally nonsensical to do.

Bugs

To file bug reports please send email to: [email protected]

Please include with your report: (1) the example input; (2) the output you expected; (3) the output PHP Markdown actually produced.

If you have a problem where Markdown gives you an empty result, first check that the backtrack limit is not too low by running php --info | grep pcre. See Installation and Requirement above for details.

Development and Testing

Pull requests for fixing bugs are welcome. Proposed new features are going to be meticulously reviewed -- taking into account backward compatibility, potential side effects, and future extensibility -- before deciding on acceptance or rejection.

If you make a pull request that includes changes to the parser please add tests for what is being changed to the test/ directory. This can be as simple as adding a .text (input) file with a corresponding .xhtml (output) file to proper category under ./test/resources/.

Traditionally tests were in a separate repository, MDTest but they are now located here, alongside the source code.

Donations

If you wish to make a donation that will help me devote more time to PHP Markdown, please visit michelf.ca/donate.

Version History

PHP Markdown Lib 1.9.0 (1 Dec 2019)

  • Added fn_backlink_label configuration variable to put some text in the aria-label attribute. (Thanks to Sunny Walker for the implementation.)

  • Occurances of "^^" in fn_backlink_html, fn_backlink_class, fn_backlink_title, and fn_backlink_label will be replaced by the corresponding footnote number in the HTML output. Occurances of "%%" will be replaced by a number for the reference (footnotes can have multiple references). (Thanks to Sunny Walker for the implementation.)

  • Added configuration variable omit_footnotes. When true footnotes are not appended at the end of the generated HTML and the footnotes_assembled variable will contain the HTML for the footnote list, allowing footnotes to be moved somewhere else on the page. (Thanks to James K. for the implementation.)

    Note: when placing the content of footnotes_assembled on the page, consider adding the attribute role="doc-endnotes" to the <div> or <section> that will enclose the list of footnotes so they are reachable to accessibility tools the same way they would be with the default HTML output.

  • Fixed deprecation warnings from PHP about usage of curly braces to access characters in text strings. (Thanks to Remi Collet and Frans-Willem Post.)

PHP Markdown Lib 1.8.0 (14 Jan 2018)

  • Autoloading with Composer now uses PSR-4.

  • HTML output for Markdown Extra footnotes now include role attributes with values from WAI-ARIA to make them more accessible. (Thanks to Tobias Bengfort)

  • In Markdown Extra, added the hashtag_protection configuration variable. When set to true it prevents ATX-style headers with no space after the initial hash from being interpreted as headers. This way your precious hashtags are preserved. (Thanks to Jaussoin Timothée for the implementation.)

PHP Markdown Lib 1.7.0 (29 Oct 2016)

  • Added a hard_wrap configuration variable to make all newline characters in the text become <br> tags in the HTML output. By default, according to the standard Markdown syntax these newlines are ignored unless they a preceded by two spaces. Thanks to Jonathan Cohlmeyer for the implementation.

  • Improved the parsing of list items to fix problematic cases that came to light with the addition of hard_wrap. This should have no effect on the output except span-level list items that ended with two spaces (and thus ended with a line break).

  • Added a code_span_content_func configuration variable which takes a function that will convert the content of the code span to HTML. This can be useful to implement syntax highlighting. Although contrary to its code block equivalent, there is no syntax for specifying a language. Credits to styxit for the implementation.

  • Fixed a Markdown Extra issue where two-space-at-end-of-line hard breaks wouldn't work inside of HTML block elements such as <p markdown="1"> where the element expects only span-level content.

  • In the parser code, switched to PHPDoc comment format. Thanks to Robbie Averill for the help.

PHP Markdown Lib 1.6.0 (23 Dec 2015)

Note: this version was incorrectly released as 1.5.1 on Dec 22, a number that contradicted the versioning policy.

  • For fenced code blocks in Markdown Extra, can now set a class name for the code block's language before the special attribute block. Previously, this class name was only allowed in the absence of the special attribute block.

  • Added a code_block_content_func configuration variable which takes a function that will convert the content of the code block to HTML. This is most useful for syntax highlighting. For fenced code blocks in Markdown Extra, the function has access to the language class name (the one outside of the special attribute block). Credits to Mario Konrad for providing the implementation.

  • The curled arrow character for the backlink in footnotes is now followed by a Unicode variant selector to prevent it from being displayed in emoji form on iOS.

    Note that in older browsers the variant selector is often interpreted as a separate character, making it visible after the arrow. So there is now a also a fn_backlink_html configuration variable that can be used to set the link text to something else. Credits to Dana for providing the implementation.

  • Fixed an issue in MarkdownExtra where long header lines followed by a special attribute block would hit the backtrack limit an cause an empty string to be returned.

PHP Markdown Lib 1.5.0 (1 Mar 2015)

  • Added the ability start ordered lists with a number different from 1 and and have that reflected in the HTML output. This can be enabled with the enhanced_ordered_lists configuration variable for the Markdown parser; it is enabled by default for Markdown Extra. Credits to Matt Gorle for providing the implementation.

  • Added the ability to insert custom HTML attributes with simple values everywhere an extra attribute block is allowed (links, images, headers). The value must be unquoted, cannot contains spaces and is limited to alphanumeric ASCII characters. Credits to Peter Droogmans for providing the implementation.

  • Added a header_id_func configuration variable which takes a function that can generate an id attribute value from the header text. Credits to Evert Pot for providing the implementation.

  • Added a url_filter_func configuration variable which takes a function that can rewrite any link or image URL to something different.

PHP Markdown Lib 1.4.1 (4 May 2014)

  • The HTML block parser will now treat <figure> as a block-level element (as it should) and no longer wrap it in <p> or parse it's content with the as Markdown syntax (although with Extra you can use markdown="1" if you wish to use the Markdown syntax inside it).

  • The content of <style> elements will now be left alone, its content won't be interpreted as Markdown.

  • Corrected an bug where some inline links with spaces in them would not work even when surounded with angle brackets:

    [link](<s p a c e s>)
    
  • Fixed an issue where email addresses with quotes in them would not always have the quotes escaped in the link attribute, causing broken links (and invalid HTML).

  • Fixed the case were a link definition following a footnote definition would be swallowed by the footnote unless it was separated by a blank line.

PHP Markdown Lib 1.4.0 (29 Nov 2013)

  • Added support for the tel: URL scheme in automatic links.

    <tel:+1-111-111-1111>
    

    It gets converted to this (note the tel: prefix becomes invisible):

    <a href="tel:+1-111-111-1111">+1-111-111-1111</a>
    
  • Added backtick fenced code blocks to MarkdownExtra, originally from Github-Flavored Markdown.

  • Added an interface called MarkdownInterface implemented by both the Markdown and MarkdownExtra parsers. You can use the interface if you want to create a mockup parser object for unit testing.

  • For those of you who cannot use class autoloading, you can now include Michelf/Markdown.inc.php or Michelf/MarkdownExtra.inc.php (note the .inc.php extension) to automatically include other files required by the parser.

PHP Markdown Lib 1.3 (11 Apr 2013)

This is the first release of PHP Markdown Lib. This package requires PHP version 5.3 or later and is designed to work with PSR-0 autoloading and, optionally with Composer. Here is a list of the changes since PHP Markdown Extra 1.2.6:

  • Plugin interface for WordPress and other systems is no longer present in the Lib package. The classic package is still available if you need it: https://michelf.ca/projects/php-markdown/classic/

  • Added public and protected protection attributes, plus a section about what is "public API" and what isn't in the Readme file.

  • Changed HTML output for footnotes: now instead of adding rel and rev attributes, footnotes links have the class name footnote-ref and backlinks footnote-backref.

  • Fixed some regular expressions to make PCRE not shout warnings about POSIX collation classes (dependent on your version of PCRE).

  • Added optional class and id attributes to images and links using the same syntax as for headers:

    [link](url){#id .class}
    ![img](url){#id .class}
    

    It work too for reference-style links and images. In this case you need to put those attributes at the reference definition:

    [link][linkref] or [linkref]
    ![img][linkref]
    
    [linkref]: url "optional title" {#id .class}
    
  • Fixed a PHP notice message triggered when some table column separator markers are missing on the separator line below column headers.

  • Fixed a small mistake that could cause the parser to retain an invalid state related to parsing links across multiple runs. This was never observed (that I know of), but it's still worth fixing.

Copyright and License

PHP Markdown Lib Copyright (c) 2004-2019 Michel Fortin https://michelf.ca/
All rights reserved.

Based on Markdown
Copyright (c) 2003-2005 John Gruber
https://daringfireball.net/
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name "Markdown" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Comments
  • Automatic return-based linebreaks instead of “two spaces at end of line” linebreaks

    Automatic return-based linebreaks instead of “two spaces at end of line” linebreaks

    Hi, is there an option to turn on Automatic return-based linebreaks instead of “two spaces at end of line” linebreaks like in the GitHub Markdown parser? If not are there any plans to implement it?

    I know this is discussed controversially but I think it would be a huge benefit for vanilla users, and it would help to use Markdown syntax in Forum software etc.

    opened by solitud 40
  • Added ability for fenced code block to allow a language to be defined.

    Added ability for fenced code block to allow a language to be defined.

    After the "~~~" of the start of the block, the language can come straight away or after some whitespace and then can have any whitespace after it before the newline that ends the fence marker line.

    The language itself can be alphanumeric with '_' and '-', and the generated code is either the normal code for the code block pre>code>{content} if no language is present, or pre.prettyprint>code.lang-{lang}>{content} if a language is specified. This fits in nicely with Google Prettify but also nice HTML5 standards, too.

    Feel free to discard the 'coding standards' commit. My text editor trims whitespace so I figured I'd do it as a separate commit in case you wanted to ignore it.

    opened by alexrussell 30
  • Header offset setting

    Header offset setting

    I'm writing a page which displays articles and consists of a page title as H1, and then the article content translated from markdown. I'd like to be able to start the header numbering of the content at H2, so I've made this fork. This is related to https://github.com/michelf/php-markdown/pull/102, but I prefer my implementation. There is an open issue for this feature here: https://github.com/michelf/php-markdown/issues/117

    opened by sjmeverett 17
  • comply with WCAG 2.0 for footnote backlinks

    comply with WCAG 2.0 for footnote backlinks

    WCAG 2.0 2.4.4 (and 2.4.9) says link texts to different URLs cannot be the same. Using aria-label which matches the title attribute is probably redundant and doesn't solve the issue. This implementation allows for user-overridable aria-labels with reference and footnote number reference options to comply with 2.4.4 and 2.4.9.

    This PR also includes an .editorconfig file to help maintain source formatting options across multiple editors/contributors.

    opened by sunnywalker 16
  • GFM Enhancements (Backticks)

    GFM Enhancements (Backticks)

    • Adding support for GFM backticks (for fenced code blocks); in additional to ~~~ already supported in Markdown Extra.
    • Adding support for GFM language marker with fenced code blocks.
    opened by jaswrks 15
  • Semantic Versioning

    Semantic Versioning

    Thank you @michelf for progressing php-markdown forward by making it a composer package and refactored much of the classes.

    I'd like to take this opportunity to suggest that we take up Semantic Versioning with php-markdown.

    Semantic Versioning helps developers better manage versions of dependencies by using the format X.Y.Z. The link above describes in details what does the numbers in the version number will represent and when will they change.

    This will greatly help php-markdown to brace any BC in the future if required and developers will be able to make better decisions with any updates.

    opened by mauris 15
  • Automatically generating id=

    Automatically generating id="" attributes

    Hi @michelf !

    This patch does the following:

    1. Adds a new public property to the markdown parses: $header_id_func.
    2. If this is set, it will be called to automatically generate an id="" attribute, but only for headers that have none!
    3. It also adds html escaping for both id and class attributes

    Usage:

    $md = new Markdown();
    $md->header_id_func = function($headerName) {
        return rawurlencode(strtolower(
            strtr($headerName, [' ' => '-'])
        ));
    };
    $html = $md->transform($text);
    

    So.. you asked only for support in MarkdownExtra. Before I knew it I had written a full implementation in Markdown. Since this doesn't break anything in Markdown, I thought I would keep it in for now.

    But if you really only want this feature in MarkdownExtra, I am also happy to remove it from Markdown for you.

    Let me know!

    cc: @simensen

    opened by evert 14
  • Alignment images through spaces

    Alignment images through spaces

    Alignment images with spaces, as in the dokuwiki eg:

    ![ title](http://site.com/image.png) - left
    ![title ](http://site.com/image.png) - right
    ![ title ](http://site.com/image.png) - center
    

    Or some other syntax..

    opened by sorbing 13
  • Adding support for ~~strikethrough~~ in MarkdownExtra

    Adding support for ~~strikethrough~~ in MarkdownExtra

    This adds support for ~~strikethrough~~ syntax (~~strikethrough~~) in MarkdownExtra.

    Related issue: https://github.com/michelf/php-markdown/issues/211

    opened by kiprobinson 12
  • PHP MarkdownExtra as single file

    PHP MarkdownExtra as single file

    At the moment \Michelf\MarkdownExtra is implemented as a subclass of \Michelf\_MarkdownExtra_TmpImpl. Are there any plans to change this? When using PHP Markdown Extra it would be nice to be able to use a single PHP file, as in previous release. Thanks!

    opened by markseuffert 11
  • Add MDTests and PHPUnit 5.7 to Run Them

    Add MDTests and PHPUnit 5.7 to Run Them

    For this PR, I've copied the test resources (input .text and their corresponding .html/.xhtml files) and added a unit test suite that can be run via PHPUnit. I've run composer require --dev "phpunit/phpunit:5.7" to get PHPUnit as a dev dependency.

    However at this point I'd like to ask about the tests in MDTest. Specifically, how up to date are they? Only about 50% pass (meaning match the exact expected output). However, a lot of the failures are simply due to whitespace differences -- sometimes trailing new lines, and sometimes new line characters within the output. I guess this is what is meant by "normalized" or not. But why would it vary? Can the expectations simply be updated to match what the "true" output should be? Or does the markdown parser have options that can be tweaked to affect the output.

    Besides the whitespace differences, the remainder of the failures seem to be due to HTML encoding which I don't know why is happening. For example, given this input (markdown/Backslash escapes.text):

    These should all get escaped:
    
    Backslash: \\
    
    Backtick: \`
    
    Asterisk: \*
    
    Underscore: \_
    

    We expect to get markdown/Backslash escapes.xhtml:

    <p>These should all get escaped:</p>
    
    <p>Backslash: \</p>
    
    <p>Backtick: `</p>
    
    <p>Asterisk: *</p>
    
    <p>Underscore: _</p>
    

    What is actually produced by Markdown::defaultTransform:

    <p>These should all get escaped:</p>
    
    <p>Backslash: &#92;</p>
    
    <p>Backtick: &#96;</p>
    
    <p>Asterisk: &#42;</p>
    
    <p>Underscore: &#95;</p>
    

    Is it implied that the entities need to be decoded first before confirming the output is correct?

    Running the tests

    The tests can be run by command line. After running composer install to download PHPUnit, run vendor/bin/phpunit.

    If there's anything else you'd like to see or change, please let me know!

    opened by michaelbutler 10
  • Better Footnote title attributes?

    Better Footnote title attributes?

    Footnote links' titles can only be set once by the library. This change would make the attribute display the content of the footnote.

    How

    At the moment, if a user hovers over a footnote, the title attribute displays a tool tip.

    For example, if https://github.com/michelf/php-markdown/blob/eb176f173fbac58a045aff78e55f833264b34e71/Michelf/MarkdownExtra.php#L28 is set to "Read the footnote." then all footnotes have this pop-up:

    Screenshot of a pop up which says 'read the footnote'

    I think it would be nice if it showed users the full text of the footnote. For example:

    The pop up now displays the full note

    This is controlled by :

    https://github.com/michelf/php-markdown/blob/eb176f173fbac58a045aff78e55f833264b34e71/Michelf/MarkdownExtra.php#L1764

    The change is relatively straightforward:

    if ($this->fn_link_title != "") {
    	$title = trim( strip_tags( $this->footnotes[$node_id] ) );
    	$title = $this->encodeAttribute( $title );
    	$attr .= " title=\"$title\"";
    }
    

    That takes the text of the footnote, sanitises it, and adds it as the title element.

    Would you be interested in a PR for this?

    (I have also raised this with WordPress's Jetpack which is running an older version of your library - https://github.com/Automattic/jetpack/issues/27387)

    opened by edent 5
  • runSpanGamut() performed twice on URL text in _doAnchors_inline_callback() function

    runSpanGamut() performed twice on URL text in _doAnchors_inline_callback() function

    Is there a reason why runSpanGamut() is called twice on the same string in the _doAnchors_inline_callback() function?

    Check out the _doAnchors_inline_callback() function in Markdown.php.

    Line 754:

    $link_text		=  $this->runSpanGamut($matches[2]);
    

    Line 773:

    $link_text = $this->runSpanGamut($link_text);
    

    As far as I see the $link_text isn't used anywhere between these two lines. I can't find any reason for this. Maybe I'm missing something?

    opened by paxter 2
  • Inline code starting with tab character in quote not rendered

    Inline code starting with tab character in quote not rendered

    Code with 4 leading spaces works.

        code here
    

    Code with leading tab works.

    	code here
    

    Code with 4 leading spaces in quote works (if there is an extra space after the >).

    >     code here
    

    Code with leading tab in quote doesn't work.

    > 	code here
    

    Is this intended behaviour or this might be a bug?

    opened by paxter 0
  • Extend test fixture to accomodate #333

    Extend test fixture to accomodate #333

    It makes the tests fail if run with a relatively small recursion limit and no JIT:

    php -dpcre.jit=0 -dpcre.recursion_limit=200 vendor/bin/phpunit
    

    See #333

    opened by sanmai 0
  • Custom attributes with quotes?

    Custom attributes with quotes?

    Currently the extra attributes cannot take a quotes string. So {attr1=abc attr2="def ghi"} does not work.

    The source regex is this:

    protected $id_class_attr_catch_re = '\{((?>[ ]*[#.a-z][-_:a-zA-Z0-9=]+){1,})[ ]*\}';
    

    Is there a reason why quoted attributes are not possible?

    I am going to see if I can change this to make it work in a derived class, if this is not on the list yet.

    Question: the {1,}, is there a reason why this is not +?

    Thanks!

    opened by jerry1970 1
Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.

league/commonmark league/commonmark is a highly-extensible PHP Markdown parser created by Colin O'Dell which supports the full CommonMark spec and Git

The League of Extraordinary Packages 2.4k Jan 1, 2023
Better Markdown Parser in PHP

Parsedown Better Markdown Parser in PHP - Demo. Features One File No Dependencies Super Fast Extensible GitHub flavored Tested in 5.3 to 7.3 Markdown

Emanuil Rusev 14.3k Jan 8, 2023
A super fast, highly extensible markdown parser for PHP

A super fast, highly extensible markdown parser for PHP What is this? A set of PHP classes, each representing a Markdown flavor, and a command line to

Carsten Brandt 989 Dec 16, 2022
A New Markdown parser for PHP5.4

Ciconia - A New Markdown Parser for PHP The Markdown parser for PHP5.4, it is fully extensible. Ciconia is the collection of extension, so you can rep

Kazuyuki Hayashi 357 Jan 3, 2023
An HTML5 parser and serializer for PHP.

HTML5-PHP HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP. It is stable and used in many production websites, and has w

null 1.2k Dec 31, 2022
Advanced shortcode (BBCode) parser and engine for PHP

Shortcode Shortcode is a framework agnostic PHP library allowing to find, extract and process text fragments called "shortcodes" or "BBCodes". Example

Tomasz Kowalczyk 358 Nov 26, 2022
Efficient, easy-to-use, and fast PHP JSON stream parser

JSON Machine Very easy to use and memory efficient drop-in replacement for inefficient iteration of big JSON files or streams for PHP 5.6+. See TL;DR.

Filip Halaxa 801 Dec 28, 2022
📜 Modern Simple HTML DOM Parser for PHP

?? Simple Html Dom Parser for PHP A HTML DOM parser written in PHP - let you manipulate HTML in a very easy way! This is a fork of PHP Simple HTML DOM

Lars Moelleken 665 Jan 4, 2023
A lightweight lexical string parser for BBCode styled markup.

Decoda A lightweight lexical string parser for BBCode styled markup. Requirements PHP 5.6.0+ Multibyte Composer Contributors "Marten-Plain" emoticons

Miles Johnson 194 Dec 27, 2022
Parsica - PHP Parser Combinators - The easiest way to build robust parsers.

Parsica The easiest way to build robust parsers in PHP.

null 0 Feb 22, 2022
Simple URL parser

urlparser Simple URL parser This is a simple URL parser, which returns an array of results from url of kind /module/controller/param1:value/param2:val

null 1 Oct 29, 2021
This is a php parser for plantuml source file.

PlantUML parser for PHP Overview This package builds AST of class definitions from plantuml files. This package works only with php. Installation Via

Tasuku Yamashita 5 May 29, 2022
This is a simple, streaming parser for processing large JSON documents

Streaming JSON parser for PHP This is a simple, streaming parser for processing large JSON documents. Use it for parsing very large JSON documents to

Salsify 687 Jan 4, 2023
A PHP hold'em range parser

mattjmattj/holdem-range-parser A PHP hold'em range parser Installation No published package yet, so you'll have to clone the project manually, or add

Matthias Jouan 1 Feb 2, 2022
Plug and play flat file markdown blog for your Laravel-projects

Ampersand Plug-and-play flat file markdown blog tool for your Laravel-project. Create an article or blog-section on your site without the hassle of se

Marcus Olsson 22 Dec 5, 2022
UpToDocs scans a Markdown file for PHP code blocks, and executes each one in a separate process.

UpToDocs UpToDocs scans a Markdown file for PHP code blocks, and executes each one in a separate process. Include this in your CI workflows, to make s

Mathias Verraes 56 Nov 26, 2022
Convert HTML to Markdown with PHP

HTML To Markdown for PHP Library which converts HTML to Markdown for your sanity and convenience. Requires: PHP 7.2+ Lead Developer: @colinodell Origi

The League of Extraordinary Packages 1.5k Dec 28, 2022
HTML sanitizer, written in PHP, aiming to provide XSS-safe markup based on explicitly allowed tags, attributes and values.

TYPO3 HTML Sanitizer ℹ️ Common safe HTML tags & attributes as given in \TYPO3\HtmlSanitizer\Builder\CommonBuilder still might be adjusted, extended or

TYPO3 GitHub Department 22 Dec 14, 2022
A simple PHP scripting application which fetch emails from your Gmail account according to a filter and parses them for information.

A simple PHP scripting application which fetch emails from your Gmail account according to a filter and parses them for information.

Haitham Sweilem 1 Jan 18, 2022