From d6ee63dc209350eb69fb5dc8109b05f491eeb572 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Tue, 3 Jan 2023 00:05:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4=20markdown=20=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Providers/AppServiceProvider.php | 1 + composer.json | 2 + composer.lock | 125 +++++++++++++++++- .../views/admin/work-orders/show.blade.php | 2 +- 4 files changed, 128 insertions(+), 2 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index fa9666c..f4d3525 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -19,6 +19,7 @@ class AppServiceProvider extends ServiceProvider public function register(): void { // + } /** diff --git a/composer.json b/composer.json index 1ba7f42..c6dd458 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,7 @@ "require": { "php": "^8.1", "doctrine/dbal": "^3.4", + "erusev/parsedown": "^1.7", "fruitcake/laravel-cors": "^3.0", "genealabs/laravel-model-caching": "^0.12.5", "guzzlehttp/guzzle": "^7.2", @@ -18,6 +19,7 @@ "laravel/octane": "^1.3", "laravel/sanctum": "^3.0", "laravel/tinker": "^2.7", + "parsedown/laravel": "^1.2", "php-mqtt/laravel-client": "^1.1", "pusher/pusher-php-server": "^7.2", "simplesoftwareio/simple-qrcode": "^4.2", diff --git a/composer.lock b/composer.lock index b6c4417..50fb0a9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3bd5ef4c5c796cdfc149a5ef57641d9a", + "content-hash": "9ba10b0e61eac712b437b33b0ab61fbe", "packages": [ { "name": "bacon/bacon-qr-code", @@ -1034,6 +1034,62 @@ ], "time": "2022-06-18T20:57:19+00:00" }, + { + "name": "erusev/parsedown", + "version": "1.7.4", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "support": { + "issues": "https://github.com/erusev/parsedown/issues", + "source": "https://github.com/erusev/parsedown/tree/1.7.x" + }, + "time": "2019-12-30T22:54:17+00:00" + }, { "name": "fruitcake/laravel-cors", "version": "v3.0.0", @@ -3667,6 +3723,73 @@ }, "time": "2022-09-26T03:40:35+00:00" }, + { + "name": "parsedown/laravel", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/parsedown/laravel.git", + "reference": "c713ffe28c76730754389180e86e93e8e84087e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/parsedown/laravel/zipball/c713ffe28c76730754389180e86e93e8e84087e7", + "reference": "c713ffe28c76730754389180e86e93e8e84087e7", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "erusev/parsedown": "^1.7", + "php": ">=7.1.3" + }, + "require-dev": { + "orchestra/testbench": "^3.8", + "php": ">=7.2", + "phpunit/phpunit": "^8.3" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Parsedown\\Providers\\ParsedownServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/Support/helpers.php" + ], + "psr-4": { + "Parsedown\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Agostini", + "email": "edu.agostini@gmail.com" + } + ], + "description": "Official Parsedown's Laravel Wrapper.", + "homepage": "http://parsedown.org", + "keywords": [ + "laravel", + "parsedown" + ], + "support": { + "issues": "https://github.com/parsedown/laravel/issues", + "source": "https://github.com/parsedown/laravel" + }, + "time": "2020-01-07T02:12:55+00:00" + }, { "name": "php-mqtt/client", "version": "v1.7.0", diff --git a/resources/views/admin/work-orders/show.blade.php b/resources/views/admin/work-orders/show.blade.php index 89a2884..ccf4bb0 100644 --- a/resources/views/admin/work-orders/show.blade.php +++ b/resources/views/admin/work-orders/show.blade.php @@ -40,7 +40,7 @@
- {{ \Illuminate\Mail\Markdown::parse($reply->content) }} + @parsedown($reply->content)
@endforeach