{"id":38534629,"url":"https://github.com/CakeDC/markup_parsers","last_synced_at":"2026-01-25T02:01:11.108Z","repository":{"id":1082694,"uuid":"929188","full_name":"CakeDC/markup_parsers","owner":"CakeDC","description":"Markup Parsers Plugin for CakePHP","archived":true,"fork":false,"pushed_at":"2013-11-03T20:49:19.000Z","size":339,"stargazers_count":29,"open_issues_count":0,"forks_count":9,"subscribers_count":12,"default_branch":"master","last_synced_at":"2026-01-20T23:59:59.308Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CakeDC.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-21T23:15:20.000Z","updated_at":"2024-11-26T00:56:43.000Z","dependencies_parsed_at":"2022-07-06T06:02:16.103Z","dependency_job_id":null,"html_url":"https://github.com/CakeDC/markup_parsers","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/CakeDC/markup_parsers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakeDC%2Fmarkup_parsers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakeDC%2Fmarkup_parsers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakeDC%2Fmarkup_parsers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakeDC%2Fmarkup_parsers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CakeDC","download_url":"https://codeload.github.com/CakeDC/markup_parsers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakeDC%2Fmarkup_parsers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28741625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T01:40:51.112Z","status":"online","status_checked_at":"2026-01-25T02:00:06.841Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T07:00:28.917Z","updated_at":"2026-01-25T02:01:11.098Z","avatar_url":"https://github.com/CakeDC.png","language":"PHP","funding_links":[],"categories":["Markup"],"sub_categories":[],"readme":"# Markup Parsers Plugin for CakePHP #\n\nThis plugin offers a solution for working with different type of markup for you application. It offers both some markup parser implementations and a parser factory responsible for registering available parser classes and returning instances of them.\n\nIt provides three different markup implementations:\n\n## BBcode Parser ##\n\nSupports the [b], [p], [u], [s], [sub], [sup]. [indent], [img], [color], [code], [color], [size], [font]. [align], [quote], [h1] ... [h6], [table] and it's associated [tr], [th] and [td], [list], [ulist] and [li]. It can also link emails and urls using the [url] tag\n\nThis parser will also split the passed string in pages, using the [Page separator] marker as separator.\n\n## Markdown Parser ##\n\nSupports regular markdown syntax with a few exceptions and additions:\n\n    * reference style links are not supported, only inline links work.\n    * Setext style headers are not supported, only ATX style headers work.\n    * Block quotes are not implemented at this time.\n\nAs this class was original intended to parse functions doc blocks, it has some additional syntax items:\n\n    * Class::method() links. These are links to other class + methods in your code base.\n    * Class::$property links. These are links to other class properties in your code base.\n    * Code blocks - Code blocks can be indicated with either {{{ code }}} or @@@ code @@@ or indented.\n\n## Html ##\n\nThe simplest of all parsers, it just adds some sugar to split a HTML string into multiple pages, and strip some dangerous content.\n\nThis parser splits the input string in multiple pages using the `\u003c!--Page Separator--\u003e` marker as separator\n\n## The ParserRegistry Class##\n\nEvery parser needs to be configured so they can be instantiated by the helper using the ParserRegistry class. To configure the parsers your are going to use in tour app put use the Configure class to list them.\n\n        Configure::write('Parsers.markdown' =\u003e array(\n\t\t\t'name' =\u003e 'Markdown',\n\t\t\t'class' =\u003e array('MarkdownParser', 'MarkupParsers.Parser'), \n\t\t));\n\nIf you have your own parser implementation you can list it to into the array this way:\n\n        Configure::write('Parsers.my_parser' =\u003e array(\n\t\t    'name' =\u003e 'MyParser',\n\t\t    'class' =\u003e array('MyParser', 'MyPlugin.Parser'),\n\t    ));\n\n## Writing a parser ##\n\nYou can develop your own parser or extend the shipped ones for your specific needs.\nA Parser class must be a Library implementing the `ParserInterface` shipped as a plugin lib.\n\nHere is a simple Parser example:\n\n\tApp::uses('ParserInterface', 'MarkupParsers.Lib');\n\tclass FoobarParser implements ParserInterface {\n\t\tpublic function parse($string, $options = array()) {\n\t\t\treturn str_replace('foo', 'bar', $string);\n\t\t}\n\t}\n\nThen you can access it from the ParserRegistry after configuring it as detailed previously.\n\n## Using the helper ##\n\nTo use any parser in your views just include the Parser helper into the $helpers array in your controller:\n\n        public $helpers = array('MarkupParsers.Parser');\n\nAnd in your views\n\n        echo $this-\u003eParser-\u003eparse($string, 'my_parser'); // the second parameter can be left blank ad will use 'markdown' as default\n\n\n## Requirements ##\n\n* PHP version: PHP 5.2+\n* CakePHP version: Cakephp 2.x Stable\n\n## Support ##\n\nFor support and feature request, please visit the [Markup Parsers Plugin Support Site](http://cakedc.lighthouseapp.com/projects/61291-markup-parsers).\n\nFor more information about our Professional CakePHP Services please visit the [Cake Development Corporation website](http://cakedc.com).\n\n## Branch strategy ##\n\nThe master branch holds the STABLE latest version of the plugin. \nDevelop branch is UNSTABLE and used to test new features before releasing them. \n\nPrevious maintenance versions are named after the CakePHP compatible version, for example, branch 1.3 is the maintenance version compatible with CakePHP 1.3.\nAll versions are updated with security patches.\n\n## Contributing to this Plugin ##\n\nPlease feel free to contribute to the plugin with new issues, requests, unit tests and code fixes or new features. If you want to contribute some code, create a feature branch from develop, and send us your pull request. Unit tests for new features and issues detected are mandatory to keep quality high. \n\n\n## License ##\n\nCopyright 2009-2012, [Cake Development Corporation](http://cakedc.com)\n\nLicensed under [The MIT License](http://www.opensource.org/licenses/mit-license.php)\u003cbr/\u003e\nRedistributions of files must retain the above copyright notice.\n\n## Copyright ###\n\nCopyright 2009-2012\u003cbr/\u003e\n[Cake Development Corporation](http://cakedc.com)\u003cbr/\u003e\n1785 E. Sahara Avenue, Suite 490-423\u003cbr/\u003e\nLas Vegas, Nevada 89104\u003cbr/\u003e\nhttp://cakedc.com\u003cbr/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCakeDC%2Fmarkup_parsers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCakeDC%2Fmarkup_parsers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCakeDC%2Fmarkup_parsers/lists"}