@@ 1234-1238 (lines=5) @@ | ||
1231 | $codeblock = $matches[1]; |
|
1232 | ||
1233 | $codeblock = $this->outdent($codeblock); |
|
1234 | if (is_callable($this->code_block_content_func)) { |
|
1235 | $codeblock = call_user_func($this->code_block_content_func, $codeblock, ""); |
|
1236 | } else { |
|
1237 | $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); |
|
1238 | } |
|
1239 | ||
1240 | # trim leading newlines and trailing newlines |
|
1241 | $codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock); |
|
@@ 1253-1257 (lines=5) @@ | ||
1250 | * @return string |
|
1251 | */ |
|
1252 | protected function makeCodeSpan($code) { |
|
1253 | if (is_callable($this->code_span_content_func)) { |
|
1254 | $code = call_user_func($this->code_span_content_func, $code); |
|
1255 | } else { |
|
1256 | $code = htmlspecialchars(trim($code), ENT_NOQUOTES); |
|
1257 | } |
|
1258 | return $this->hashPart("<code>$code</code>"); |
|
1259 | } |
|
1260 |