{"id":13828313,"url":"https://github.com/thephpleague/commonmark-ext-table","last_synced_at":"2025-07-09T06:31:34.549Z","repository":{"id":32711433,"uuid":"36301048","full_name":"thephpleague/commonmark-ext-table","owner":"thephpleague","description":"The table extension for CommonMark PHP implementation","archived":true,"fork":false,"pushed_at":"2020-04-04T15:53:25.000Z","size":131,"stargazers_count":128,"open_issues_count":0,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-09-07T05:06:47.912Z","etag":null,"topics":["commonmark","table"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sajari/docconv","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thephpleague.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-26T14:23:13.000Z","updated_at":"2024-05-03T10:26:46.000Z","dependencies_parsed_at":"2022-06-27T00:04:26.380Z","dependency_job_id":null,"html_url":"https://github.com/thephpleague/commonmark-ext-table","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thephpleague","download_url":"https://codeload.github.com/thephpleague/commonmark-ext-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225492420,"owners_count":17482869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["commonmark","table"],"created_at":"2024-08-04T09:02:40.918Z","updated_at":"2024-11-20T08:30:24.600Z","avatar_url":"https://github.com/thephpleague.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"CommonMark Table Extension\n==========================\n\n[![Latest Version](https://img.shields.io/packagist/v/league/commonmark-ext-table.svg?style=flat-square)](https://packagist.org/packages/league/commonmark-ext-table)\n[![Build Status](https://img.shields.io/travis/thephpleague/commonmark-ext-table.svg?style=flat-square)](https://travis-ci.org/thephpleague/commonmark-ext-table)\n[![Code Quality](https://img.shields.io/scrutinizer/g/thephpleague/commonmark-ext-table.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-table/code-structure)\n[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/thephpleague/commonmark-ext-table.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-table)\n\n## DEPRECATED\n\n**This extension has been deprecated**.  All of its functionality now exists in [`league/commonmark`](https://github.com/thephpleague/commonmark) 1.3+ under the `League\\CommonMark\\Extension\\Table` namespace, so you should upgrade to that version and use that bundled extension instead of this one.\n\n## Overview\n\nThe Table extension adds the ability to create tables in CommonMark documents.\n\nInstallation\n------------\n\nThis project can be installed via Composer:\n\n    composer require league/commonmark-ext-table\n\nUsage\n-----\n\nConfigure your `Environment` as usual and simply add the `TableExtension` provided by this package:\n\n```php\nuse League\\CommonMark\\Converter;\nuse League\\CommonMark\\DocParser;\nuse League\\CommonMark\\Environment;\nuse League\\CommonMark\\HtmlRenderer;\nuse League\\CommonMark\\Ext\\Table\\TableExtension;\n\n// Obtain a pre-configured Environment with all the standard CommonMark parsers/renderers ready-to-go\n$environment = Environment::createCommonMarkEnvironment();\n\n// Add this extension\n$environment-\u003eaddExtension(new TableExtension());\n\n// Instantiate the converter engine and start converting some Markdown!\n$converter = new Converter(new DocParser($environment), new HtmlRenderer($environment));\n\necho $converter-\u003econvertToHtml('# Hello World!');\n```\n\nSyntax\n------\n\nThis package is fully compatible with GFM-style tables:\n\n### Simple\n\nCode:\n```markdown\nth | th(center) | th(right)\n---|:----------:|----------:\ntd | td         | td\n```\n\nResult:\n```html\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth style=\"text-align: left\"\u003eth\u003c/th\u003e\n\u003cth style=\"text-align: center\"\u003eth(center)\u003c/th\u003e\n\u003cth style=\"text-align: right\"\u003eth(right\u003c)/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd style=\"text-align: left\"\u003etd\u003c/td\u003e\n\u003ctd style=\"text-align: center\"\u003etd\u003c/td\u003e\n\u003ctd style=\"text-align: right\"\u003etd\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n```\n\n### Advanced\n\n```markdown\n| header 1 | header 2 | header 2 |\n| :------- | :------: | -------: |\n| cell 1.1 | cell 1.2 | cell 1.3 |\n| cell 2.1 | cell 2.2 | cell 2.3 |\n```\n\n### Table caption\n\n```markdown\nheader 1 | header 2\n-------- | --------\ncell 1.1 | cell 1.2\n[Simple table]\n```\n\nCode:\n```markdown\nheader 1 | header 2\n-------- | --------\ncell 1.1 | cell 1.2\n[*Prototype* table][reference_table]\n```\n\nResult:\n```html\n\u003ctable\u003e\n\u003ccaption id=\"reference_table\"\u003e\u003cem\u003ePrototype\u003c/em\u003e table\u003c/caption\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eheader 1\u003c/th\u003e\n\u003cth\u003eheader 2\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003ecell 1.1\u003c/td\u003e\n\u003ctd\u003ecell 1.2\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ctable\u003e\n```\n\nChangelog\n---------\n\nPlease refer to the [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\nDevelopment\n-----------\n\nYou need to have *php* or *docker* installed to develop the library. To list all available commands run:\n\n```bash\n./run\n```\n\nSecurity\n--------\n\nIf you discover any security related issues, please email colinodell@gmail.com instead of using the issue tracker.\n\nCredits\n-------\n\n- [Martin Hasoň](https://github.com/hason)\n- [Webuni s.r.o.](https://www.webuni.cz)\n- [Colin O'Dell](https://github.com/colinodell)\n- [All Contributors](../../contributors)\n\nLicense\n-------\n\nThis library is licensed under the MIT license.  See the [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthephpleague%2Fcommonmark-ext-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthephpleague%2Fcommonmark-ext-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthephpleague%2Fcommonmark-ext-table/lists"}