| @@ 1984-1992 (lines=9) @@ | ||
| 1981 | } |
|
| 1982 | ||
| 1983 | // The idea is, if we are LOOKING for a block level tag, we can close them on the way. |
|
| 1984 | if (strlen($look_for) > 0 && isset($bbc_codes[$look_for[0]])) |
|
| 1985 | { |
|
| 1986 | foreach ($bbc_codes[$look_for[0]] as $temp) |
|
| 1987 | if ($temp['tag'] == $look_for) |
|
| 1988 | { |
|
| 1989 | $block_level = !empty($temp['block_level']); |
|
| 1990 | break; |
|
| 1991 | } |
|
| 1992 | } |
|
| 1993 | ||
| 1994 | if ($block_level !== true) |
|
| 1995 | { |
|
| @@ 2014-2022 (lines=9) @@ | ||
| 2011 | } |
|
| 2012 | elseif (!empty($to_close) && $tag['tag'] != $look_for) |
|
| 2013 | { |
|
| 2014 | if ($block_level === null && isset($look_for[0], $bbc_codes[$look_for[0]])) |
|
| 2015 | { |
|
| 2016 | foreach ($bbc_codes[$look_for[0]] as $temp) |
|
| 2017 | if ($temp['tag'] == $look_for) |
|
| 2018 | { |
|
| 2019 | $block_level = !empty($temp['block_level']); |
|
| 2020 | break; |
|
| 2021 | } |
|
| 2022 | } |
|
| 2023 | ||
| 2024 | // We're not looking for a block level tag (or maybe even a tag that exists...) |
|
| 2025 | if (!$block_level) |
|