diff --git a/composer.json b/composer.json index e742c36..b25f330 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,11 @@ { "require": { - "mnapoli/front-yaml": "^1.6", - "michelf/php-markdown": "^1.8" + "tildeverse/wiki": "dev-master" }, - "autoload": { - "psr-4": { - "Rfcs\\": "src/" + "repositories": [ + { + "type": "vcs", + "url": "https://tildegit.org/ben/tildewiki" } - } + ] } diff --git a/composer.lock b/composer.lock index ee74d16..605dc72 100644 --- a/composer.lock +++ b/composer.lock @@ -1,23 +1,23 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f693531fd51bd92297c17d6a290a6f16", + "content-hash": "3ab3df15c4e40417f427b37691e83088", "packages": [ { "name": "erusev/parsedown", - "version": "1.7.1", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7", + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7", "shasum": "" }, "require": { @@ -50,53 +50,51 @@ "markdown", "parser" ], - "time": "2018-03-08T01:11:30+00:00" + "time": "2019-03-17T18:48:37+00:00" }, { - "name": "michelf/php-markdown", - "version": "1.8.0", + "name": "erusev/parsedown-extra", + "version": "0.7.1", "source": { "type": "git", - "url": "https://github.com/michelf/php-markdown.git", - "reference": "01ab082b355bf188d907b9929cd99b2923053495" + "url": "https://github.com/erusev/parsedown-extra.git", + "reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495", - "reference": "01ab082b355bf188d907b9929cd99b2923053495", + "url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/0db5cce7354e4b76f155d092ab5eb3981c21258c", + "reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c", "shasum": "" }, "require": { - "php": ">=5.3.0" + "erusev/parsedown": "~1.4" }, "type": "library", "autoload": { - "psr-4": { - "Michelf\\": "Michelf/" + "psr-0": { + "ParsedownExtra": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "https://michelf.ca/", - "role": "Developer" - }, - { - "name": "John Gruber", - "homepage": "https://daringfireball.net/" + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" } ], - "description": "PHP Markdown", - "homepage": "https://michelf.ca/projects/php-markdown/", + "description": "An extension of Parsedown that adds support for Markdown Extra.", + "homepage": "https://github.com/erusev/parsedown-extra", "keywords": [ - "markdown" + "markdown", + "markdown extra", + "parsedown", + "parser" ], - "time": "2018-01-15T00:49:33+00:00" + "time": "2015-11-01T10:19:22+00:00" }, { "name": "mnapoli/front-yaml", @@ -135,16 +133,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.9.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + "reference": "82ebae02209c21113908c229e9883c419720738a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", "shasum": "" }, "require": { @@ -156,7 +154,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -189,20 +187,20 @@ "polyfill", "portable" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/yaml", - "version": "v4.1.3", + "version": "v4.3.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "46bc69aa91fc4ab78a96ce67873a6b0c148fd48c" + "reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/46bc69aa91fc4ab78a96ce67873a6b0c148fd48c", - "reference": "46bc69aa91fc4ab78a96ce67873a6b0c148fd48c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c60ecf5ba842324433b46f58dc7afc4487dbab99", + "reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99", "shasum": "" }, "require": { @@ -221,7 +219,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -248,13 +246,45 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:24:31+00:00" + "time": "2019-04-06T14:04:46+00:00" + }, + { + "name": "tildeverse/wiki", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://tildegit.org/ben/tildewiki", + "reference": "751eb64c383cb7c6ec643eaf683b88aa1de351ea" + }, + "require": { + "erusev/parsedown-extra": "^0.7.1", + "mnapoli/front-yaml": "^1.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Tildeverse\\Wiki\\": "src/" + } + }, + "license": [ + "GPLv3" + ], + "authors": [ + { + "name": "Ben Harris", + "email": "ben@tilde.team" + } + ], + "description": "parsedown extensions for tilde wikis", + "time": "2019-07-03T05:06:34+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "tildeverse/wiki": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/rfcs/index.php b/rfcs/index.php index bc54bfc..ee0fbba 100644 --- a/rfcs/index.php +++ b/rfcs/index.php @@ -1,7 +1,7 @@ mdparser = new MarkdownExtra(); - $this->mdparser->header_id_func = function ($header) { - return preg_replace('/[^a-z0-9]/', '-', strtolower($header)); - }; - } - - public function parse($markdown) { - return $this->mdparser->transform($markdown); - } - - public static function factory() { - return new FrontYAML\Parser(null, new MDParser()); - } -}