| @@ 2172-2180 (lines=9) @@ | ||
| 2169 | } |
|
| 2170 | ||
| 2171 | // The idea is, if we are LOOKING for a block level tag, we can close them on the way. |
|
| 2172 | if (strlen($look_for) > 0 && isset($bbc_codes[$look_for[0]])) |
|
| 2173 | { |
|
| 2174 | foreach ($bbc_codes[$look_for[0]] as $temp) |
|
| 2175 | if ($temp['tag'] == $look_for) |
|
| 2176 | { |
|
| 2177 | $block_level = !empty($temp['block_level']); |
|
| 2178 | break; |
|
| 2179 | } |
|
| 2180 | } |
|
| 2181 | ||
| 2182 | if ($block_level !== true) |
|
| 2183 | { |
|
| @@ 2202-2210 (lines=9) @@ | ||
| 2199 | } |
|
| 2200 | elseif (!empty($to_close) && $tag['tag'] != $look_for) |
|
| 2201 | { |
|
| 2202 | if ($block_level === null && isset($look_for[0], $bbc_codes[$look_for[0]])) |
|
| 2203 | { |
|
| 2204 | foreach ($bbc_codes[$look_for[0]] as $temp) |
|
| 2205 | if ($temp['tag'] == $look_for) |
|
| 2206 | { |
|
| 2207 | $block_level = !empty($temp['block_level']); |
|
| 2208 | break; |
|
| 2209 | } |
|
| 2210 | } |
|
| 2211 | ||
| 2212 | // We're not looking for a block level tag (or maybe even a tag that exists...) |
|
| 2213 | if (!$block_level) |
|