@@ 115-122 (lines=8) @@ | ||
112 | } elseif (substr($tag, 0, 9) == '<!DOCTYPE') { |
|
113 | // it's the doctype declaration so no line break here either |
|
114 | $result = $tabs . $tag; |
|
115 | } else { |
|
116 | // normal block tag |
|
117 | $result = "\n" . $tabs . $tag; |
|
118 | ||
119 | if (!empty($add)) { |
|
120 | $result .= "\n" . $tabs . "\t" . str_replace("\n", "\n\t" . $tabs, $add); |
|
121 | } |
|
122 | } |
|
123 | ||
124 | self::$lastCallAdd = $add; |
|
125 | ||
@@ 145-151 (lines=7) @@ | ||
142 | // if it's one of those tag it's inline so it does not require a leading line break |
|
143 | if (preg_match('#^</(a|label|option|textarea|h1|h2|h3|h4|h5|h6|strong|b|em|i|abbr|acronym|cite|span|sub|sup|u|s|title)>#', $tag)) { |
|
144 | $result = $tag . $whitespace . str_replace("\n", "\n" . $tabs, $add); |
|
145 | } else { |
|
146 | $result = "\n" . $tabs . $tag; |
|
147 | ||
148 | if (!empty($add)) { |
|
149 | $result .= "\n" . $tabs . "\t" . str_replace("\n", "\n\t" . $tabs, $add); |
|
150 | } |
|
151 | } |
|
152 | ||
153 | self::$lastCallAdd = $add; |
|
154 | ||
@@ 178-184 (lines=7) @@ | ||
175 | if (!empty($add)) { |
|
176 | $result .= str_replace("\n", "\n" . $tabs, $add); |
|
177 | } |
|
178 | } else { |
|
179 | $result = "\n" . $tabs . $tag; |
|
180 | ||
181 | if (!empty($add)) { |
|
182 | $result .= "\n" . $tabs . str_replace("\n", "\n" . $tabs, $add); |
|
183 | } |
|
184 | } |
|
185 | ||
186 | self::$lastCallAdd = $add; |
|
187 |