Version: 4.3.4 Reporter: Brian Litzinger —
I ran into this using Bloqs. If I have two blocks that start with the same name, e.g. {slideshow}{/slideshow} and {slide}{/slide}, the regex in the method seems to match both, thus returning two items in the array, not one. For example the Bloqs code is making the following call:
$sections = $this->EE->api_channel_fields->get_pair_field($tagdata, $context->getShortname(), '');
In this case the shortname is either “slideshow” or “slide”, and when both tag pairs are in the template, it returns a match for both, thus the $sections variable has an array containing 2 keys, each key contains an array of the 4 parts of the regex match. If I add a 3rd block with the name of {slider}{/slider}, $sections will then contain 3 matches. This causes some major rendering issues, mostly duplicating output, but in Bloqs’ nesting feature, it bombs out completely b/c the expected result does not match what get_pair_field is actually returning.
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); } ```