@@ -6,7 +6,7 @@ |
||
6 | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Mos\\TextFilter\\' => array($vendorDir . '/mos/ctextfilter/src/TextFilter'), |
|
10 | - 'Mos\\' => array($vendorDir . '/mos/cdatabase/src', $vendorDir . '/mos/cform/src'), |
|
11 | - 'Anax\\' => array($vendorDir . '/anax/mvc/src'), |
|
9 | + 'Mos\\TextFilter\\' => array($vendorDir.'/mos/ctextfilter/src/TextFilter'), |
|
10 | + 'Mos\\' => array($vendorDir.'/mos/cdatabase/src', $vendorDir.'/mos/cform/src'), |
|
11 | + 'Anax\\' => array($vendorDir.'/anax/mvc/src'), |
|
12 | 12 | ); |
@@ -344,14 +344,14 @@ discard block |
||
344 | 344 | private function findFileWithExtension($class, $ext) |
345 | 345 | { |
346 | 346 | // PSR-4 lookup |
347 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
347 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
348 | 348 | |
349 | 349 | $first = $class[0]; |
350 | 350 | if (isset($this->prefixLengthsPsr4[$first])) { |
351 | 351 | foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { |
352 | 352 | if (0 === strpos($class, $prefix)) { |
353 | 353 | foreach ($this->prefixDirsPsr4[$prefix] as $dir) { |
354 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { |
|
354 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $length))) { |
|
355 | 355 | return $file; |
356 | 356 | } |
357 | 357 | } |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | |
362 | 362 | // PSR-4 fallback dirs |
363 | 363 | foreach ($this->fallbackDirsPsr4 as $dir) { |
364 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
364 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
365 | 365 | return $file; |
366 | 366 | } |
367 | 367 | } |
@@ -373,14 +373,14 @@ discard block |
||
373 | 373 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
374 | 374 | } else { |
375 | 375 | // PEAR-like class name |
376 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
376 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | if (isset($this->prefixesPsr0[$first])) { |
380 | 380 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
381 | 381 | if (0 === strpos($class, $prefix)) { |
382 | 382 | foreach ($dirs as $dir) { |
383 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
383 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
384 | 384 | return $file; |
385 | 385 | } |
386 | 386 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | |
391 | 391 | // PSR-0 fallback dirs |
392 | 392 | foreach ($this->fallbackDirsPsr0 as $dir) { |
393 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
393 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
394 | 394 | return $file; |
395 | 395 | } |
396 | 396 | } |
@@ -6,7 +6,7 @@ |
||
6 | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Monolog' => array($baseDir . '/src'), |
|
10 | - 'Michelf' => array($vendorDir . '/michelf/php-markdown'), |
|
11 | - 'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'), |
|
9 | + 'Monolog' => array($baseDir.'/src'), |
|
10 | + 'Michelf' => array($vendorDir.'/michelf/php-markdown'), |
|
11 | + 'HTMLPurifier' => array($vendorDir.'/ezyang/htmlpurifier/library'), |
|
12 | 12 | ); |
@@ -6,5 +6,5 @@ |
||
6 | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | |
8 | 8 | return array( |
9 | - '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', |
|
9 | + '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir.'/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', |
|
10 | 10 | ); |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . "/../vendor/autoload.php"; |
|
3 | +include __DIR__."/../vendor/autoload.php"; |
@@ -439,7 +439,7 @@ |
||
439 | 439 | [FIGURE src=$src caption="$caption"] |
440 | 440 | EOD; |
441 | 441 | |
442 | - $exp = <<<EOD |
|
442 | + $exp = <<<EOD |
|
443 | 443 | <figure class='figure'> |
444 | 444 | <a href='$src'><img src='$src' alt='$caption'/></a> |
445 | 445 | <figcaption markdown=1>$caption</figcaption> |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | $frontmatter = substr($text, $start + $tokenLength, $length); |
241 | 241 | $textStart = substr($text, 0, $start); |
242 | - $text = $textStart . substr($text, $stop + $tokenLength); |
|
242 | + $text = $textStart.substr($text, $stop + $tokenLength); |
|
243 | 243 | } |
244 | 244 | } |
245 | 245 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | list($text, $frontmatter) = $this->extractFrontMatter($text, $needle, $needle); |
289 | 289 | |
290 | 290 | if (function_exists("yaml_parse") && !empty($frontmatter)) { |
291 | - $frontmatter = yaml_parse($needle . $frontmatter); |
|
291 | + $frontmatter = yaml_parse($needle.$frontmatter); |
|
292 | 292 | |
293 | 293 | if ($frontmatter === false) { |
294 | 294 | throw new Exception("Failed parsing YAML frontmatter."); |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | { |
372 | 372 | return preg_replace_callback( |
373 | 373 | '#\b(?<![href|src]=[\'"])https?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', |
374 | - function ($matches) { |
|
374 | + function($matches) { |
|
375 | 375 | return "<a href='{$matches[0]}'>{$matches[0]}</a>"; |
376 | 376 | }, |
377 | 377 | $text |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | */ |
390 | 390 | public function purify($text) |
391 | 391 | { |
392 | - $config = \HTMLPurifier_Config::createDefault(); |
|
392 | + $config = \HTMLPurifier_Config::createDefault(); |
|
393 | 393 | $config->set("Cache.DefinitionImpl", null); |
394 | 394 | //$config->set('Cache.SerializerPath', '/home/user/absolute/path'); |
395 | 395 | |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | |
444 | 444 | return preg_replace_callback( |
445 | 445 | $patterns, |
446 | - function ($matches) { |
|
446 | + function($matches) { |
|
447 | 447 | switch ($matches[1]) { |
448 | 448 | |
449 | 449 | case 'FIGURE': |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | $res[$match] = true; |
479 | 479 | } else { |
480 | 480 | $key = substr($match, 0, $pos); |
481 | - $val = trim(substr($match, $pos+1), '"'); |
|
481 | + $val = trim(substr($match, $pos + 1), '"'); |
|
482 | 482 | $res[$key] = $val; |
483 | 483 | } |
484 | 484 | } |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | public static function shortCodeFigure($options) |
501 | 501 | { |
502 | 502 | // Merge incoming options with default and expose as variables |
503 | - $options= array_merge( |
|
503 | + $options = array_merge( |
|
504 | 504 | [ |
505 | 505 | 'id' => null, |
506 | 506 | 'class' => null, |
@@ -6,6 +6,6 @@ |
||
6 | 6 | # Take a look at the PSR-0-compatible class autoloading implementation |
7 | 7 | # in the Readme.php file if you want a simple autoloader setup. |
8 | 8 | |
9 | -require_once dirname(__FILE__) . '/MarkdownInterface.php'; |
|
10 | -require_once dirname(__FILE__) . '/Markdown.php'; |
|
11 | -require_once dirname(__FILE__) . '/MarkdownExtra.php'; |
|
9 | +require_once dirname(__FILE__).'/MarkdownInterface.php'; |
|
10 | +require_once dirname(__FILE__).'/Markdown.php'; |
|
11 | +require_once dirname(__FILE__).'/MarkdownExtra.php'; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | ### Version ### |
23 | 23 | |
24 | - const MARKDOWNLIB_VERSION = "1.5.0"; |
|
24 | + const MARKDOWNLIB_VERSION = "1.5.0"; |
|
25 | 25 | |
26 | 26 | ### Simple Function Interface ### |
27 | 27 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | # try to take parser from the static parser list |
37 | 37 | static $parser_list; |
38 | - $parser =& $parser_list[$parser_class]; |
|
38 | + $parser = & $parser_list[$parser_class]; |
|
39 | 39 | |
40 | 40 | # create the parser it not already set |
41 | 41 | if (!$parser) |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | $this->teardown(); |
188 | 188 | |
189 | - return $text . "\n"; |
|
189 | + return $text."\n"; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | protected $document_gamut = array( |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $link_id = strtolower($matches[1]); |
236 | 236 | $url = $matches[2] == '' ? $matches[3] : $matches[2]; |
237 | 237 | $this->urls[$link_id] = $url; |
238 | - $this->titles[$link_id] =& $matches[4]; |
|
238 | + $this->titles[$link_id] = & $matches[4]; |
|
239 | 239 | return ''; # String that will replace the block |
240 | 240 | } |
241 | 241 | |
@@ -290,8 +290,8 @@ discard block |
||
290 | 290 | (?> |
291 | 291 | /> |
292 | 292 | | |
293 | - >', $nested_tags_level). # end of opening tag |
|
294 | - '.*?'. # last level nested tag content |
|
293 | + >', $nested_tags_level).# end of opening tag |
|
294 | + '.*?'.# last level nested tag content |
|
295 | 295 | str_repeat(' |
296 | 296 | </\2\s*> # closing nested tag |
297 | 297 | ) |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | |
404 | 404 | # Then hash the block. |
405 | 405 | static $i = 0; |
406 | - $key = "$boundary\x1A" . ++$i . $boundary; |
|
406 | + $key = "$boundary\x1A".++$i.$boundary; |
|
407 | 407 | $this->html_hashes[$key] = $text; |
408 | 408 | return $key; # String that will replace the tag. |
409 | 409 | } |
@@ -596,9 +596,9 @@ discard block |
||
596 | 596 | return $text; |
597 | 597 | } |
598 | 598 | protected function _doAnchors_reference_callback($matches) { |
599 | - $whole_match = $matches[1]; |
|
600 | - $link_text = $matches[2]; |
|
601 | - $link_id =& $matches[3]; |
|
599 | + $whole_match = $matches[1]; |
|
600 | + $link_text = $matches[2]; |
|
601 | + $link_id = & $matches[3]; |
|
602 | 602 | |
603 | 603 | if ($link_id == "") { |
604 | 604 | # for shortcut links like [this][] or [this]. |
@@ -614,10 +614,10 @@ discard block |
||
614 | 614 | $url = $this->encodeURLAttribute($url); |
615 | 615 | |
616 | 616 | $result = "<a href=\"$url\""; |
617 | - if ( isset( $this->titles[$link_id] ) ) { |
|
617 | + if (isset($this->titles[$link_id])) { |
|
618 | 618 | $title = $this->titles[$link_id]; |
619 | 619 | $title = $this->encodeAttribute($title); |
620 | - $result .= " title=\"$title\""; |
|
620 | + $result .= " title=\"$title\""; |
|
621 | 621 | } |
622 | 622 | |
623 | 623 | $link_text = $this->runSpanGamut($link_text); |
@@ -630,10 +630,10 @@ discard block |
||
630 | 630 | return $result; |
631 | 631 | } |
632 | 632 | protected function _doAnchors_inline_callback($matches) { |
633 | - $whole_match = $matches[1]; |
|
634 | - $link_text = $this->runSpanGamut($matches[2]); |
|
635 | - $url = $matches[3] == '' ? $matches[4] : $matches[3]; |
|
636 | - $title =& $matches[7]; |
|
633 | + $whole_match = $matches[1]; |
|
634 | + $link_text = $this->runSpanGamut($matches[2]); |
|
635 | + $url = $matches[3] == '' ? $matches[4] : $matches[3]; |
|
636 | + $title = & $matches[7]; |
|
637 | 637 | |
638 | 638 | // if the URL was of the form <s p a c e s> it got caught by the HTML |
639 | 639 | // tag parser and hashed. Need to reverse the process before using the URL. |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | $result = "<a href=\"$url\""; |
647 | 647 | if (isset($title)) { |
648 | 648 | $title = $this->encodeAttribute($title); |
649 | - $result .= " title=\"$title\""; |
|
649 | + $result .= " title=\"$title\""; |
|
650 | 650 | } |
651 | 651 | |
652 | 652 | $link_text = $this->runSpanGamut($link_text); |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | if (isset($this->titles[$link_id])) { |
728 | 728 | $title = $this->titles[$link_id]; |
729 | 729 | $title = $this->encodeAttribute($title); |
730 | - $result .= " title=\"$title\""; |
|
730 | + $result .= " title=\"$title\""; |
|
731 | 731 | } |
732 | 732 | $result .= $this->empty_element_suffix; |
733 | 733 | $result = $this->hashPart($result); |
@@ -740,17 +740,17 @@ discard block |
||
740 | 740 | return $result; |
741 | 741 | } |
742 | 742 | protected function _doImages_inline_callback($matches) { |
743 | - $whole_match = $matches[1]; |
|
744 | - $alt_text = $matches[2]; |
|
745 | - $url = $matches[3] == '' ? $matches[4] : $matches[3]; |
|
746 | - $title =& $matches[7]; |
|
743 | + $whole_match = $matches[1]; |
|
744 | + $alt_text = $matches[2]; |
|
745 | + $url = $matches[3] == '' ? $matches[4] : $matches[3]; |
|
746 | + $title = & $matches[7]; |
|
747 | 747 | |
748 | 748 | $alt_text = $this->encodeAttribute($alt_text); |
749 | 749 | $url = $this->encodeURLAttribute($url); |
750 | 750 | $result = "<img src=\"$url\" alt=\"$alt_text\""; |
751 | 751 | if (isset($title)) { |
752 | 752 | $title = $this->encodeAttribute($title); |
753 | - $result .= " title=\"$title\""; # $title already quoted |
|
753 | + $result .= " title=\"$title\""; # $title already quoted |
|
754 | 754 | } |
755 | 755 | $result .= $this->empty_element_suffix; |
756 | 756 | |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | $idAtt = $this->_generateIdFromHeaderValue($matches[1]); |
801 | 801 | |
802 | 802 | $block = "<h$level$idAtt>".$this->runSpanGamut($matches[1])."</h$level>"; |
803 | - return "\n" . $this->hashBlock($block) . "\n\n"; |
|
803 | + return "\n".$this->hashBlock($block)."\n\n"; |
|
804 | 804 | } |
805 | 805 | protected function _doHeaders_callback_atx($matches) { |
806 | 806 | |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | |
810 | 810 | $level = strlen($matches[1]); |
811 | 811 | $block = "<h$level$idAtt>".$this->runSpanGamut($matches[2])."</h$level>"; |
812 | - return "\n" . $this->hashBlock($block) . "\n\n"; |
|
812 | + return "\n".$this->hashBlock($block)."\n\n"; |
|
813 | 813 | } |
814 | 814 | |
815 | 815 | protected function _generateIdFromHeaderValue($headerValue) { |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | $idValue = call_user_func($this->header_id_func, $headerValue); |
826 | 826 | if (!$idValue) return ""; |
827 | 827 | |
828 | - return ' id="' . $this->encodeAttribute($idValue) . '"'; |
|
828 | + return ' id="'.$this->encodeAttribute($idValue).'"'; |
|
829 | 829 | |
830 | 830 | } |
831 | 831 | |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | $list = $matches[1]; |
905 | 905 | $list_type = preg_match("/$marker_ul_re/", $matches[4]) ? "ul" : "ol"; |
906 | 906 | |
907 | - $marker_any_re = ( $list_type == "ul" ? $marker_ul_re : $marker_ol_re ); |
|
907 | + $marker_any_re = ($list_type == "ul" ? $marker_ul_re : $marker_ol_re); |
|
908 | 908 | |
909 | 909 | $list .= "\n"; |
910 | 910 | $result = $this->processListItems($list, $marker_any_re); |
@@ -915,18 +915,18 @@ discard block |
||
915 | 915 | if ($list_type == 'ol') { |
916 | 916 | $ol_start_array = array(); |
917 | 917 | $ol_start_check = preg_match("/$marker_ol_start_re/", $matches[4], $ol_start_array); |
918 | - if ($ol_start_check){ |
|
918 | + if ($ol_start_check) { |
|
919 | 919 | $ol_start = $ol_start_array[0]; |
920 | 920 | } |
921 | 921 | } |
922 | 922 | } |
923 | 923 | |
924 | - if ($ol_start > 1 && $list_type == 'ol'){ |
|
925 | - $result = $this->hashBlock("<$list_type start=\"$ol_start\">\n" . $result . "</$list_type>"); |
|
924 | + if ($ol_start > 1 && $list_type == 'ol') { |
|
925 | + $result = $this->hashBlock("<$list_type start=\"$ol_start\">\n".$result."</$list_type>"); |
|
926 | 926 | } else { |
927 | - $result = $this->hashBlock("<$list_type>\n" . $result . "</$list_type>"); |
|
927 | + $result = $this->hashBlock("<$list_type>\n".$result."</$list_type>"); |
|
928 | 928 | } |
929 | - return "\n". $result ."\n\n"; |
|
929 | + return "\n".$result."\n\n"; |
|
930 | 930 | } |
931 | 931 | |
932 | 932 | protected $list_level = 0; |
@@ -979,16 +979,16 @@ discard block |
||
979 | 979 | } |
980 | 980 | protected function _processListItems_callback($matches) { |
981 | 981 | $item = $matches[4]; |
982 | - $leading_line =& $matches[1]; |
|
983 | - $leading_space =& $matches[2]; |
|
982 | + $leading_line = & $matches[1]; |
|
983 | + $leading_space = & $matches[2]; |
|
984 | 984 | $marker_space = $matches[3]; |
985 | - $tailing_blank_line =& $matches[5]; |
|
985 | + $tailing_blank_line = & $matches[5]; |
|
986 | 986 | |
987 | 987 | if ($leading_line || $tailing_blank_line || |
988 | 988 | preg_match('/\n{2,}/', $item)) |
989 | 989 | { |
990 | 990 | # Replace marker with the appropriate whitespace indentation |
991 | - $item = $leading_space . str_repeat(' ', strlen($marker_space)) . $item; |
|
991 | + $item = $leading_space.str_repeat(' ', strlen($marker_space)).$item; |
|
992 | 992 | $item = $this->runBlockGamut($this->outdent($item)."\n"); |
993 | 993 | } |
994 | 994 | else { |
@@ -998,7 +998,7 @@ discard block |
||
998 | 998 | $item = $this->runSpanGamut($item); |
999 | 999 | } |
1000 | 1000 | |
1001 | - return "<li>" . $item . "</li>\n"; |
|
1001 | + return "<li>".$item."</li>\n"; |
|
1002 | 1002 | } |
1003 | 1003 | |
1004 | 1004 | |
@@ -1076,7 +1076,7 @@ discard block |
||
1076 | 1076 | $token_relist[] = $strong_re; |
1077 | 1077 | |
1078 | 1078 | # Construct master expression from list. |
1079 | - $token_re = '{('. implode('|', $token_relist) .')}'; |
|
1079 | + $token_re = '{('.implode('|', $token_relist).')}'; |
|
1080 | 1080 | $this->em_strong_prepared_relist["$em$strong"] = $token_re; |
1081 | 1081 | } |
1082 | 1082 | } |
@@ -1102,8 +1102,8 @@ discard block |
||
1102 | 1102 | # |
1103 | 1103 | $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); |
1104 | 1104 | $text_stack[0] .= $parts[0]; |
1105 | - $token =& $parts[1]; |
|
1106 | - $text =& $parts[2]; |
|
1105 | + $token = & $parts[1]; |
|
1106 | + $text = & $parts[2]; |
|
1107 | 1107 | |
1108 | 1108 | if (empty($token)) { |
1109 | 1109 | # Reached end of text span: empty stack without emitting. |
@@ -1130,7 +1130,7 @@ discard block |
||
1130 | 1130 | } else { |
1131 | 1131 | # Other closing marker: close one em or strong and |
1132 | 1132 | # change current token state to match the other |
1133 | - $token_stack[0] = str_repeat($token{0}, 3-$token_len); |
|
1133 | + $token_stack[0] = str_repeat($token{0}, 3 - $token_len); |
|
1134 | 1134 | $tag = $token_len == 2 ? "strong" : "em"; |
1135 | 1135 | $span = $text_stack[0]; |
1136 | 1136 | $span = $this->runSpanGamut($span); |
@@ -1224,7 +1224,7 @@ discard block |
||
1224 | 1224 | $bq = $matches[1]; |
1225 | 1225 | # trim one level of quoting - trim whitespace-only lines |
1226 | 1226 | $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq); |
1227 | - $bq = $this->runBlockGamut($bq); # recurse |
|
1227 | + $bq = $this->runBlockGamut($bq); # recurse |
|
1228 | 1228 | |
1229 | 1229 | $bq = preg_replace('/^/m', " ", $bq); |
1230 | 1230 | # These leading spaces cause problem with <pre> content, |
@@ -1232,7 +1232,7 @@ discard block |
||
1232 | 1232 | $bq = preg_replace_callback('{(\s*<pre>.+?</pre>)}sx', |
1233 | 1233 | array($this, '_doBlockQuotes_callback2'), $bq); |
1234 | 1234 | |
1235 | - return "\n". $this->hashBlock("<blockquote>\n$bq\n</blockquote>")."\n\n"; |
|
1235 | + return "\n".$this->hashBlock("<blockquote>\n$bq\n</blockquote>")."\n\n"; |
|
1236 | 1236 | } |
1237 | 1237 | protected function _doBlockQuotes_callback2($matches) { |
1238 | 1238 | $pre = $matches[1]; |
@@ -1432,7 +1432,7 @@ discard block |
||
1432 | 1432 | if ($text == "") return $tail = ""; |
1433 | 1433 | |
1434 | 1434 | $chars = preg_split('/(?<!^)(?!$)/', $text); |
1435 | - $seed = (int)abs(crc32($text) / strlen($text)); # Deterministic seed. |
|
1435 | + $seed = (int) abs(crc32($text) / strlen($text)); # Deterministic seed. |
|
1436 | 1436 | |
1437 | 1437 | foreach ($chars as $key => $char) { |
1438 | 1438 | $ord = ord($char); |
@@ -1468,7 +1468,7 @@ discard block |
||
1468 | 1468 | | |
1469 | 1469 | (?<![`\\\\]) |
1470 | 1470 | `+ # code span marker |
1471 | - '.( $this->no_markup ? '' : ' |
|
1471 | + '.($this->no_markup ? '' : ' |
|
1472 | 1472 | | |
1473 | 1473 | <!-- .*? --> # comment |
1474 | 1474 | | |
@@ -1522,7 +1522,7 @@ discard block |
||
1522 | 1522 | # |
1523 | 1523 | switch ($token{0}) { |
1524 | 1524 | case "\\": |
1525 | - return $this->hashPart("&#". ord($token{1}). ";"); |
|
1525 | + return $this->hashPart("&#".ord($token{1}).";"); |
|
1526 | 1526 | case "`": |
1527 | 1527 | # Search for end marker in remaining text. |
1528 | 1528 | if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', |
@@ -1577,7 +1577,7 @@ discard block |
||
1577 | 1577 | # Calculate amount of space, insert spaces, insert block. |
1578 | 1578 | $amount = $this->tab_width - |
1579 | 1579 | $strlen($line, 'UTF-8') % $this->tab_width; |
1580 | - $line .= str_repeat(" ", $amount) . $block; |
|
1580 | + $line .= str_repeat(" ", $amount).$block; |
|
1581 | 1581 | } |
1582 | 1582 | return $line; |
1583 | 1583 | } |