| @@ 2058-2066 (lines=9) @@ | ||
| 2055 | } |
|
| 2056 | ||
| 2057 | // The idea is, if we are LOOKING for a block level tag, we can close them on the way. |
|
| 2058 | if (strlen($look_for) > 0 && isset($bbc_codes[$look_for[0]])) |
|
| 2059 | { |
|
| 2060 | foreach ($bbc_codes[$look_for[0]] as $temp) |
|
| 2061 | if ($temp['tag'] == $look_for) |
|
| 2062 | { |
|
| 2063 | $block_level = !empty($temp['block_level']); |
|
| 2064 | break; |
|
| 2065 | } |
|
| 2066 | } |
|
| 2067 | ||
| 2068 | if ($block_level !== true) |
|
| 2069 | { |
|
| @@ 2088-2096 (lines=9) @@ | ||
| 2085 | } |
|
| 2086 | elseif (!empty($to_close) && $tag['tag'] != $look_for) |
|
| 2087 | { |
|
| 2088 | if ($block_level === null && isset($look_for[0], $bbc_codes[$look_for[0]])) |
|
| 2089 | { |
|
| 2090 | foreach ($bbc_codes[$look_for[0]] as $temp) |
|
| 2091 | if ($temp['tag'] == $look_for) |
|
| 2092 | { |
|
| 2093 | $block_level = !empty($temp['block_level']); |
|
| 2094 | break; |
|
| 2095 | } |
|
| 2096 | } |
|
| 2097 | ||
| 2098 | // We're not looking for a block level tag (or maybe even a tag that exists...) |
|
| 2099 | if (!$block_level) |
|