@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | return iterator_to_array($this->generateResults($matches)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - return preg_replace_callback("/$regex/", function ($match) use ($callback) { |
|
| 34 | + return preg_replace_callback("/$regex/", function($match) use ($callback) { |
|
| 35 | 35 | if ($match[1] == '[' && $match[6] == ']') { |
| 36 | 36 | return substr($match[0], 1, -1); |
| 37 | 37 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | .'\\[\\/\\2\\]' // Closing shortcode tag |
| 83 | 83 | .')?' |
| 84 | 84 | .')' |
| 85 | - .'(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]] |
|
| 85 | + .'(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]] |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ]); |
| 106 | 106 | $pattern = "/{$patterns}/"; |
| 107 | 107 | $text = preg_replace("/[\x{00a0}\x{200b}]+/u", ' ', $text); |
| 108 | - if (preg_match_all($pattern, (string) $text, $match, PREG_SET_ORDER)) { |
|
| 108 | + if (preg_match_all($pattern, (string)$text, $match, PREG_SET_ORDER)) { |
|
| 109 | 109 | |
| 110 | 110 | // Reject any unclosed HTML elements |
| 111 | 111 | foreach ($this->generateAttributes($match) as $att => $value) { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | public function doShortcode(string $content, $tags = [], bool $deep = false): string |
| 142 | 142 | { |
| 143 | 143 | $tags = $this->preProcessTags($tags); |
| 144 | - $handler = function (string $tag, ?string $content = null, array $atts = []) { |
|
| 144 | + $handler = function(string $tag, ?string $content = null, array $atts = []) { |
|
| 145 | 145 | $shortcode = $this[$tag]; |
| 146 | 146 | |
| 147 | 147 | if ($shortcode instanceof AttributeInterface) { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | return $shortcode->handle($content); |
| 154 | 154 | }; |
| 155 | 155 | |
| 156 | - $result = (string) $this->parser->parseShortcode($content, $tags, $handler); |
|
| 156 | + $result = (string)$this->parser->parseShortcode($content, $tags, $handler); |
|
| 157 | 157 | |
| 158 | 158 | if ($deep && $this->hasShortcode($result, $tags)) { |
| 159 | 159 | return $this->doShortcode($result, $tags, $deep); |