{"id":13828327,"url":"https://github.com/thephpleague/commonmark-ext-smartpunct","last_synced_at":"2026-01-14T00:48:58.215Z","repository":{"id":57013267,"uuid":"174903674","full_name":"thephpleague/commonmark-ext-smartpunct","owner":"thephpleague","description":"Intelligently converts ASCII quotes, dashes, and ellipses to their Unicode equivalents","archived":true,"fork":false,"pushed_at":"2020-04-04T15:24:03.000Z","size":43,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-29T04:26:43.065Z","etag":null,"topics":["commonmark","commonmark-extension","markdown","php"],"latest_commit_sha":null,"homepage":null,"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/thephpleague.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"colinodell","patreon":"colinodell"}},"created_at":"2019-03-11T01:24:55.000Z","updated_at":"2025-06-06T04:13:33.000Z","dependencies_parsed_at":"2022-08-21T14:50:35.380Z","dependency_job_id":null,"html_url":"https://github.com/thephpleague/commonmark-ext-smartpunct","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/thephpleague/commonmark-ext-smartpunct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-smartpunct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-smartpunct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-smartpunct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-smartpunct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thephpleague","download_url":"https://codeload.github.com/thephpleague/commonmark-ext-smartpunct/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thephpleague%2Fcommonmark-ext-smartpunct/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["commonmark","commonmark-extension","markdown","php"],"created_at":"2024-08-04T09:02:41.616Z","updated_at":"2026-01-14T00:48:58.186Z","avatar_url":"https://github.com/thephpleague.png","language":"PHP","funding_links":["https://github.com/sponsors/colinodell","https://patreon.com/colinodell"],"categories":["PHP"],"sub_categories":[],"readme":"# Smart Punctuation for `league/commonmark`\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n[![Coverage Status][ico-scrutinizer]][link-scrutinizer]\n[![Quality Score][ico-code-quality]][link-code-quality]\n[![Total Downloads][ico-downloads]][link-downloads]\n\n## DEPRECATED\n\n**This extension has been deprecated**.  All of its functionality now exists in [`league/commonmark`][link-league-commonmark] 1.3+ under the `League\\CommonMark\\Extension\\SmartPunct` namespace, so you should upgrade to that version and use that bundled extension instead of this one.\n\n## Overview\n\nIntelligently converts ASCII quotes, dashes, and ellipses to their Unicode equivalents.  For use with the [`league/commonmark` Markdown parser for PHP](https://github.com/thephpleague/commonmark).\n\nFor example, this Markdown...\n\n```md\n\"CommonMark is the PHP League's Markdown parser,\" she said.  \"It's super-configurable... you can even use additional extensions to expand its capabilities -- just like this one!\"\n```\n\nWill result in this HTML:\n\n```html\n\u003cp\u003e“CommonMark is the PHP League’s Markdown parser,” she said.  “It’s super-configurable… you can even use additional extensions to expand its capabilities – just like this one!”\u003c/p\u003e\n```\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require league/commonmark-ext-smartpunct\n```\n\n## Usage\n\nExtensions can be added to any new `Environment`:\n\n``` php\nuse League\\CommonMark\\CommonMarkConverter;\nuse League\\CommonMark\\Environment;\nuse League\\CommonMark\\Ext\\SmartPunct\\SmartPunctExtension;\n\n// Obtain a pre-configured Environment with all the CommonMark parsers/renderers ready-to-go\n$environment = Environment::createCommonMarkEnvironment();\n\n// Add this extension\n$environment-\u003eaddExtension(new SmartPunctExtension());\n\n// Set your configuration\n$config = [\n    'smartpunct' =\u003e [\n        'double_quote_opener' =\u003e '“',\n        'double_quote_closer' =\u003e '”',\n        'single_quote_opener' =\u003e '‘',\n        'single_quote_closer' =\u003e '’',\n    ],\n];\n\n// Instantiate the converter engine and start converting some Markdown!\n$converter = new CommonMarkConverter($config, $environment);\necho $converter-\u003econvertToHtml('# Hello World!');\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Security\n\nIf you discover any security related issues, please email colinodell@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Colin O'Dell][link-author]\n- [John MacFarlane][link-jgm]\n- [All Contributors][link-contributors]\n\n## License\n\nThis library is licensed under the BSD-3 license.  See the [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/league/commonmark-ext-smartpunct.svg?style=flat-square\n[ico-license]: http://img.shields.io/badge/License-BSD--3-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/thephpleague/commonmark-ext-smartpunct/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/thephpleague/commonmark-ext-smartpunct.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/thephpleague/commonmark-ext-smartpunct.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/league/commonmark-ext-smartpunct.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/league/commonmark-ext-smartpunct\n[link-travis]: https://travis-ci.org/thephpleague/commonmark-ext-smartpunct\n[link-scrutinizer]: https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-smartpunct/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/thephpleague/commonmark-ext-smartpunct\n[link-downloads]: https://packagist.org/packages/league/commonmark-ext-smartpunct\n[link-author]: https://github.com/colinodell\n[link-contributors]: ../../contributors\n[link-league-commonmark]: https://github.com/thephpleague/commonmark\n[link-jgm]: https://github.com/jgm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthephpleague%2Fcommonmark-ext-smartpunct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthephpleague%2Fcommonmark-ext-smartpunct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthephpleague%2Fcommonmark-ext-smartpunct/lists"}