| @@ 2162-2170 (lines=9) @@ | ||
| 2159 | } |
|
| 2160 | ||
| 2161 | // The idea is, if we are LOOKING for a block level tag, we can close them on the way. |
|
| 2162 | if (strlen($look_for) > 0 && isset($bbc_codes[$look_for[0]])) |
|
| 2163 | { |
|
| 2164 | foreach ($bbc_codes[$look_for[0]] as $temp) |
|
| 2165 | if ($temp['tag'] == $look_for) |
|
| 2166 | { |
|
| 2167 | $block_level = !empty($temp['block_level']); |
|
| 2168 | break; |
|
| 2169 | } |
|
| 2170 | } |
|
| 2171 | ||
| 2172 | if ($block_level !== true) |
|
| 2173 | { |
|
| @@ 2192-2200 (lines=9) @@ | ||
| 2189 | } |
|
| 2190 | elseif (!empty($to_close) && $tag['tag'] != $look_for) |
|
| 2191 | { |
|
| 2192 | if ($block_level === null && isset($look_for[0], $bbc_codes[$look_for[0]])) |
|
| 2193 | { |
|
| 2194 | foreach ($bbc_codes[$look_for[0]] as $temp) |
|
| 2195 | if ($temp['tag'] == $look_for) |
|
| 2196 | { |
|
| 2197 | $block_level = !empty($temp['block_level']); |
|
| 2198 | break; |
|
| 2199 | } |
|
| 2200 | } |
|
| 2201 | ||
| 2202 | // We're not looking for a block level tag (or maybe even a tag that exists...) |
|
| 2203 | if (!$block_level) |
|