Version: 4.0.7 Reporter: Warble Media —
I had an issue where parsing conditionals on a very large (537,327 chars) block of template was just resulting in nothing.
I traced the template parser and found the issue was when EllisLab\ExpressionEngine\Library\Parser\Conditional\Parser::parse()
was called return preg_replace('/^\n?(.*?)\n?$/is', '$1', $out);
(Line 75).
Setting pcre.backtrack_limit
to a higher value in the php.ini worked as a temporary solution, but a better solution would be to change this line to:
$out = preg_replace('/^\n/', '', $out);
$out = preg_replace('/\n$/', '', $out);
return $out;
This produces the same result, but does not require backtracking and because of this not only solves the issue, but should also be more performant.
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```