diff --git a/app/Services/Parser/Parsers/Latex.php b/app/Services/Parser/Parsers/Latex.php
index f37695021..3d9970a4a 100644
--- a/app/Services/Parser/Parsers/Latex.php
+++ b/app/Services/Parser/Parsers/Latex.php
@@ -7,14 +7,12 @@ protected function parseHashed(string $text): string
{
return \preg_replace_callback(
"#(.*?)#si",
- function ($match) {
- return sprintf(
- '',
- rawurlencode($match[1]),
- htmlspecialchars($match[1])
- );
- },
- $text
+ fn(array $match): string => \sPrintF(
+ '',
+ \rawUrlEncode($match[1]),
+ \htmlSpecialChars($match[1]),
+ ),
+ $text,
);
}
}
diff --git a/resources/sass/components/forms/_markdown.scss b/resources/sass/components/forms/_markdown.scss
index ed76f61ee..392173bba 100644
--- a/resources/sass/components/forms/_markdown.scss
+++ b/resources/sass/components/forms/_markdown.scss
@@ -1,3 +1,5 @@
+@import "../../../feature/theme/theme";
+
.editor {
border: 1px solid $border-color;
padding: $input-padding-y 0;
@@ -77,3 +79,9 @@
}
}
}
+
+img.latex {
+ @include dark {
+ filter: invert(1);
+ }
+}