Make use of the s modifier to parse the highlighter file
authorAlexander Ebert <ebert@woltlab.com>
Wed, 4 Nov 2020 16:24:55 +0000 (17:24 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 4 Nov 2020 16:24:55 +0000 (17:24 +0100)
wcfsetup/install/files/lib/system/bbcode/BBCodeHandler.class.php

index 6bee36543f42ea94e72cdc9b30eb666e76ea7a89..3cd7c88165618977cc781a16bee9e1b56c7dbb9f 100644 (file)
@@ -126,7 +126,7 @@ class BBCodeHandler extends SingletonFactory {
         */
        public function getHighlighterMeta() {
                if ($this->highlighterMeta === null) {
-                       $this->highlighterMeta = JSON::decode(preg_replace('/.*\/\*!START\*\/\s*const\s*metadata\s*=\s*(.*)\s*;\s*\/\*!END\*\/.*/', '\\1', file_get_contents(WCF_DIR.'/js/WoltLabSuite/Core/prism-meta.js')));
+                       $this->highlighterMeta = JSON::decode(preg_replace('/.*\/\*!START\*\/\s*const\s*metadata\s*=\s*(.*)\s*;\s*\/\*!END\*\/.*/s', '\\1', file_get_contents(WCF_DIR.'/js/WoltLabSuite/Core/prism-meta.js')));
                }
                
                return $this->highlighterMeta;