@@ 1220-1224 (lines=5) @@ | ||
1217 | $codeblock = $matches[1]; |
|
1218 | ||
1219 | $codeblock = $this->outdent($codeblock); |
|
1220 | if (is_callable($this->code_block_content_func)) { |
|
1221 | $codeblock = call_user_func($this->code_block_content_func, $codeblock, ""); |
|
1222 | } else { |
|
1223 | $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); |
|
1224 | } |
|
1225 | ||
1226 | # trim leading newlines and trailing newlines |
|
1227 | $codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock); |
|
@@ 1239-1243 (lines=5) @@ | ||
1236 | * @return string |
|
1237 | */ |
|
1238 | protected function makeCodeSpan($code) { |
|
1239 | if (is_callable($this->code_span_content_func)) { |
|
1240 | $code = call_user_func($this->code_span_content_func, $code); |
|
1241 | } else { |
|
1242 | $code = htmlspecialchars(trim($code), ENT_NOQUOTES); |
|
1243 | } |
|
1244 | return $this->hashPart("<code>$code</code>"); |
|
1245 | } |
|
1246 |