From 112ec98103ca3bb33c15df91a1a1fc019b682af5 Mon Sep 17 00:00:00 2001 From: Floorb <132411956+Neetpone@users.noreply.github.com> Date: Mon, 29 May 2023 11:13:32 -0400 Subject: [PATCH] fix: make Pastedown better? --- composer.lock | 114 +-- includes/Pastedown.php | 99 +- vendor/composer/autoload_psr4.php | 2 +- vendor/composer/autoload_static.php | 4 +- vendor/composer/installed.json | 142 +-- vendor/composer/installed.php | 78 +- .../database/Eloquent/Casts/ArrayObject.php | 1 + vendor/illuminate/database/Eloquent/Model.php | 2 +- .../database/Migrations/Migrator.php | 4 +- vendor/illuminate/support/Facades/Cache.php | 1 + vendor/illuminate/support/Facades/Request.php | 2 +- vendor/illuminate/support/Str.php | 2 +- .../support/Testing/Fakes/EventFake.php | 5 +- vendor/nesbot/carbon/composer.json | 3 +- vendor/nesbot/carbon/readme.md | 31 +- vendor/nesbot/carbon/sponsors.php | 87 ++ vendor/nesbot/carbon/src/Carbon/Carbon.php | 934 +++++++++--------- .../carbon/src/Carbon/CarbonImmutable.php | 934 +++++++++--------- .../carbon/src/Carbon/CarbonInterface.php | 68 +- .../carbon/src/Carbon/CarbonInterval.php | 11 +- vendor/nesbot/carbon/src/Carbon/Factory.php | 2 +- .../carbon/src/Carbon/FactoryImmutable.php | 2 +- .../nesbot/carbon/src/Carbon/Lang/en_CH.php | 8 + .../carbon/src/Carbon/Traits/Creator.php | 13 +- .../carbon/src/Carbon/Traits/Options.php | 2 +- .../nesbot/carbon/src/Carbon/Traits/Test.php | 7 +- .../nesbot/carbon/src/Carbon/Traits/Units.php | 16 +- vendor/symfony/console/Application.php | 2 +- .../console/Command/CompleteCommand.php | 4 +- .../console/Command/DumpCompletionCommand.php | 29 +- .../Formatter/OutputFormatterStyle.php | 3 +- .../console/Helper/ProgressIndicator.php | 2 - .../symfony/console/Helper/QuestionHelper.php | 17 +- vendor/symfony/console/Helper/Table.php | 2 +- .../symfony/console/Input/InputArgument.php | 8 +- vendor/symfony/console/Input/InputOption.php | 6 +- vendor/symfony/console/LICENSE | 2 +- .../console/Output/ConsoleSectionOutput.php | 12 +- .../symfony/console/Resources/completion.zsh | 2 + vendor/symfony/console/Style/SymfonyStyle.php | 6 + vendor/symfony/console/Terminal.php | 17 +- vendor/symfony/console/composer.json | 2 +- vendor/symfony/deprecation-contracts/LICENSE | 2 +- .../symfony/deprecation-contracts/README.md | 2 +- vendor/symfony/service-contracts/LICENSE | 2 +- vendor/symfony/service-contracts/README.md | 2 +- .../service-contracts/ResetInterface.php | 3 + .../ServiceProviderInterface.php | 2 +- .../ServiceSubscriberTrait.php | 9 +- .../symfony/string/AbstractUnicodeString.php | 4 +- .../string/Inflector/EnglishInflector.php | 6 + vendor/symfony/string/LICENSE | 2 +- vendor/symfony/translation-contracts/LICENSE | 2 +- .../LocaleAwareInterface.php | 2 + .../symfony/translation-contracts/README.md | 2 +- .../Test/TranslatorTest.php | 16 +- .../translation-contracts/TranslatorTrait.php | 3 + vendor/symfony/translation/CHANGELOG.md | 7 + .../Command/TranslationPushCommand.php | 2 +- .../DependencyInjection/TranslatorPass.php | 8 +- .../TranslatorPathsPass.php | 29 +- vendor/symfony/translation/LICENSE | 2 +- .../translation/Loader/ArrayLoader.php | 6 +- .../translation/Loader/IcuResFileLoader.php | 2 +- vendor/symfony/translation/LocaleSwitcher.php | 5 +- .../translation/MessageCatalogueInterface.php | 2 - vendor/symfony/translation/README.md | 2 +- .../Test/ProviderFactoryTestCase.php | 10 +- .../translation/Test/ProviderTestCase.php | 6 +- vendor/symfony/translation/TranslatorBag.php | 2 +- 70 files changed, 1547 insertions(+), 1283 deletions(-) create mode 100644 vendor/nesbot/carbon/sponsors.php diff --git a/composer.lock b/composer.lock index 8b425ec..6a8151a 100644 --- a/composer.lock +++ b/composer.lock @@ -255,7 +255,7 @@ }, { "name": "illuminate/collections", - "version": "v9.52.4", + "version": "v9.52.7", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", @@ -310,7 +310,7 @@ }, { "name": "illuminate/conditionable", - "version": "v9.52.4", + "version": "v9.52.7", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -356,7 +356,7 @@ }, { "name": "illuminate/container", - "version": "v9.52.4", + "version": "v9.52.7", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", @@ -407,7 +407,7 @@ }, { "name": "illuminate/contracts", - "version": "v9.52.4", + "version": "v9.52.7", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -455,16 +455,16 @@ }, { "name": "illuminate/database", - "version": "v9.52.4", + "version": "v9.52.7", "source": { "type": "git", "url": "https://github.com/illuminate/database.git", - "reference": "fc7e9cf5d4c7c4c0a2800c0d345cc9985fb1b040" + "reference": "a2d8423c05ef70101b675d4552bd7bb36a6cc890" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/fc7e9cf5d4c7c4c0a2800c0d345cc9985fb1b040", - "reference": "fc7e9cf5d4c7c4c0a2800c0d345cc9985fb1b040", + "url": "https://api.github.com/repos/illuminate/database/zipball/a2d8423c05ef70101b675d4552bd7bb36a6cc890", + "reference": "a2d8423c05ef70101b675d4552bd7bb36a6cc890", "shasum": "" }, "require": { @@ -521,11 +521,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-12T20:16:50+00:00" + "time": "2023-03-13T03:00:40+00:00" }, { "name": "illuminate/macroable", - "version": "v9.52.4", + "version": "v9.52.7", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -571,16 +571,16 @@ }, { "name": "illuminate/support", - "version": "v9.52.4", + "version": "v9.52.7", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "63dcb4523ccdfc01cdf5be17791f07cc20982a1e" + "reference": "5c38d755c5fa767d5b689867888ee4e5f53fc8a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/63dcb4523ccdfc01cdf5be17791f07cc20982a1e", - "reference": "63dcb4523ccdfc01cdf5be17791f07cc20982a1e", + "url": "https://api.github.com/repos/illuminate/support/zipball/5c38d755c5fa767d5b689867888ee4e5f53fc8a6", + "reference": "5c38d755c5fa767d5b689867888ee4e5f53fc8a6", "shasum": "" }, "require": { @@ -638,20 +638,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-13T16:54:43+00:00" + "time": "2023-04-04T18:35:58+00:00" }, { "name": "nesbot/carbon", - "version": "2.66.0", + "version": "2.67.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "496712849902241f04902033b0441b269effe001" + "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/496712849902241f04902033b0441b269effe001", - "reference": "496712849902241f04902033b0441b269effe001", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c1001b3bc75039b07f38a79db5237c4c529e04c8", + "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8", "shasum": "" }, "require": { @@ -740,7 +740,7 @@ "type": "tidelift" } ], - "time": "2023-01-29T18:53:47+00:00" + "time": "2023-05-25T22:09:47+00:00" }, { "name": "psr/container", @@ -926,16 +926,16 @@ }, { "name": "symfony/console", - "version": "v6.2.5", + "version": "v6.2.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3e294254f2191762c1d137aed4b94e966965e985" + "reference": "5aa03db8ef0a5457c316ec580e69562d97734c77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985", - "reference": "3e294254f2191762c1d137aed4b94e966965e985", + "url": "https://api.github.com/repos/symfony/console/zipball/5aa03db8ef0a5457c316ec580e69562d97734c77", + "reference": "5aa03db8ef0a5457c316ec580e69562d97734c77", "shasum": "" }, "require": { @@ -997,12 +997,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.5" + "source": "https://github.com/symfony/console/tree/v6.2.11" }, "funding": [ { @@ -1018,20 +1018,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2023-05-26T08:16:21+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "shasum": "" }, "require": { @@ -1069,7 +1069,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" }, "funding": [ { @@ -1085,7 +1085,7 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:25:55+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1502,16 +1502,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" + "reference": "a8c9cedf55f314f3a186041d19537303766df09a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a", "shasum": "" }, "require": { @@ -1567,7 +1567,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" }, "funding": [ { @@ -1583,20 +1583,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:32:47+00:00" }, { "name": "symfony/string", - "version": "v6.2.5", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", - "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "shasum": "" }, "require": { @@ -1653,7 +1653,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.5" + "source": "https://github.com/symfony/string/tree/v6.2.8" }, "funding": [ { @@ -1669,20 +1669,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "symfony/translation", - "version": "v6.2.5", + "version": "v6.2.11", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "60556925a703cfbc1581cde3b3f35b0bb0ea904c" + "reference": "64113df3e8b009f92fad63014f4ec647e65bc927" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/60556925a703cfbc1581cde3b3f35b0bb0ea904c", - "reference": "60556925a703cfbc1581cde3b3f35b0bb0ea904c", + "url": "https://api.github.com/repos/symfony/translation/zipball/64113df3e8b009f92fad63014f4ec647e65bc927", + "reference": "64113df3e8b009f92fad63014f4ec647e65bc927", "shasum": "" }, "require": { @@ -1751,7 +1751,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.2.5" + "source": "https://github.com/symfony/translation/tree/v6.2.11" }, "funding": [ { @@ -1767,20 +1767,20 @@ "type": "tidelift" } ], - "time": "2023-01-05T07:00:27+00:00" + "time": "2023-05-19T12:37:14+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "68cce71402305a015f8c1589bfada1280dc64fe7" + "reference": "dfec258b9dd17a6b24420d464c43bffe347441c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/68cce71402305a015f8c1589bfada1280dc64fe7", - "reference": "68cce71402305a015f8c1589bfada1280dc64fe7", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dfec258b9dd17a6b24420d464c43bffe347441c8", + "reference": "dfec258b9dd17a6b24420d464c43bffe347441c8", "shasum": "" }, "require": { @@ -1832,7 +1832,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.2.1" }, "funding": [ { @@ -1848,7 +1848,7 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:32:47+00:00" }, { "name": "voku/portable-ascii", diff --git a/includes/Pastedown.php b/includes/Pastedown.php index 72172ae..d37f1e7 100644 --- a/includes/Pastedown.php +++ b/includes/Pastedown.php @@ -5,48 +5,111 @@ use ParsedownExtra; class Pastedown extends ParsedownExtra { public function __construct() { + parent::__construct(); unset($this->BlockTypes['>']); + $this->BlockTypes['>'] = ['Greentext']; $this->InlineTypes['>'] = ['Greentext']; array_unshift($this->InlineTypes['<'], 'Redtext'); + $this->BlockTypes['<'] = ['Redtext']; $this->InlineTypes['@'] = ['Purpletext']; + $this->BlockTypes['@'] = ['Purpletext']; } protected function inlineGreentext($Line) { - if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'markup' => "
* @author Mateusz Sip