diff --git a/app/Docs.php b/app/Docs.php index 55e42397..ab636114 100644 --- a/app/Docs.php +++ b/app/Docs.php @@ -132,7 +132,7 @@ public function content(): ?string ->after('---') ->after('---') ->markdown(extensions: [ - new \Laravelsu\Highlight\CommonMark\HighlightExtension(), + new \Laravelsu\Highlight\CommonMark\HighlightExtension, new UnfencedExtension, ]) ->toString(); diff --git a/app/Library.php b/app/Library.php index 2c6c060a..e5e5356d 100644 --- a/app/Library.php +++ b/app/Library.php @@ -31,7 +31,7 @@ public function __construct(string $name) ->after('---') ->after('---') ->markdown(extensions: [ - new HighlightExtension() + new HighlightExtension, ]) ->toString(); } diff --git a/app/Models/Comment.php b/app/Models/Comment.php index 8500d614..05582801 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -125,7 +125,7 @@ public function prettyComment(): string ], ], [ - new \Laravelsu\Highlight\CommonMark\HighlightExtension(), + new \Laravelsu\Highlight\CommonMark\HighlightExtension, new MentionExtension, ] ); diff --git a/app/View/Components/Posts/Content.php b/app/View/Components/Posts/Content.php index 757de629..db6bfc27 100644 --- a/app/View/Components/Posts/Content.php +++ b/app/View/Components/Posts/Content.php @@ -54,7 +54,7 @@ public function toHtml(): string 'max_nesting_level' => 20, ], [ - new \Laravelsu\Highlight\CommonMark\HighlightExtension(), + new \Laravelsu\Highlight\CommonMark\HighlightExtension, ]) ->toString(); diff --git a/resources/css/app.scss b/resources/css/app.scss index 51c0be7c..883e420a 100644 --- a/resources/css/app.scss +++ b/resources/css/app.scss @@ -109,7 +109,7 @@ $utilities: ( @import 'gagarin'; @import 'slider'; @import 'santa'; -@import "highlight"; +@import 'highlight'; .avatar { border-radius: 10em; diff --git a/resources/css/docs.scss b/resources/css/docs.scss index 8044a783..9dc519b4 100644 --- a/resources/css/docs.scss +++ b/resources/css/docs.scss @@ -420,7 +420,6 @@ main, white-space: pre !important; overflow: hidden; } - } .code-container { diff --git a/resources/css/highlight.scss b/resources/css/highlight.scss index 630d0fea..76fcbe2a 100644 --- a/resources/css/highlight.scss +++ b/resources/css/highlight.scss @@ -94,12 +94,12 @@ pre { user-select: none; &-addition { - background-color: #34A853; + background-color: #34a853; color: #fff; } &-deletion { - background-color: #E94F4F; + background-color: #e94f4f; color: #fff; } } diff --git a/resources/css/marketing.scss b/resources/css/marketing.scss index 266bf2ff..0b57a47a 100644 --- a/resources/css/marketing.scss +++ b/resources/css/marketing.scss @@ -27,7 +27,6 @@ } } - .code-marketing-snipped { pre { margin: 0; diff --git a/resources/js/controllers/prism_controller.js b/resources/js/controllers/prism_controller.js index fc847e35..045b8150 100644 --- a/resources/js/controllers/prism_controller.js +++ b/resources/js/controllers/prism_controller.js @@ -13,12 +13,10 @@ export default class extends Controller { Prism.manual = false; [...this.element.querySelectorAll('pre code')].forEach((el) => { - - if(el.classList.contains('notranslate')){ + if (el.classList.contains('notranslate')) { return; } - if (el.getAttribute('class') === null) { el.setAttribute('class', 'language-php'); }