17 $par->armor[
'MakeWellFormed_TagClosedError'] =
true;
25 if (empty($this->currentNesting) || strpos($text,
"\n\n") !==
false) {
37 if (!$token->is_whitespace || $this->_isInline($current)) {
46 $token = array($this->
_pStart());
66 $token = array($this->
_pStart(), $token);
77 !empty($this->currentNesting) &&
78 $this->currentNesting[count($this->currentNesting)-1]->name ==
'p'
101 if (!empty($this->currentNesting)) {
116 substr($prev->data, -2) ===
"\n\n"
122 $token = array($this->
_pStart(), $token);
142 $token = array($this->
_pStart(), $token);
161 $token = array($this->
_pStart(), $token);
178 if (!is_array($token)) $token = array($token);
179 array_unshift($token,
new HTMLPurifier_Token_Text(
"\n\n"));
212 $raw_paragraphs = explode(
"\n\n", $data);
213 $paragraphs = array();
214 $needs_start =
false;
217 $c = count($raw_paragraphs);
224 for ($i = 0; $i < $c; $i++) {
225 $par = $raw_paragraphs[$i];
226 if (trim($par) !==
'') {
227 $paragraphs[] = $par;
250 } elseif ($i + 1 == $c) {
260 if (empty($paragraphs)) {
270 foreach ($paragraphs as $par) {
296 return isset($this->htmlDefinition->info[
'p']->child->elements[$token->name]);
331 if (strpos($current->data,
"\n\n") !==
false) {