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) {
allowsElement($name)
Tests if the context node allows a certain element.
Concrete end token class.
Concrete start token class.
_isInline($token)
Returns true if passed token is inline (and, ergo, allowed in paragraph tags)
_checkNeedsP($current)
Determines if a particular token requires an earlier inline token to get a paragraph.
_splitText($data, &$result)
Splits up a text in paragraph tokens and appends them to the result stream that will replace the orig...
forwardUntilEndToken(&$i, &$current, &$nesting)
Similar to _forward, but accepts a third parameter $nesting (which should be initialized at 0) and st...
Injects tokens into the document while parsing for well-formedness.
Injector that auto paragraphs text in the root node based on double-spacing.
backward(&$i, &$current)
Iterator function, starts with the previous token and continues until you reach the beginning of inpu...
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
current(&$i, &$current)
Initializes the iterator at the current position.
Concrete text token class.
_pLookAhead()
Looks ahead in the token list and determines whether or not we need to insert a.