27 $par->armor[
'MakeWellFormed_TagClosedError'] =
true;
39 if (empty($this->currentNesting) || strpos(
$text,
"\n\n") !==
false) {
51 if (!$token->is_whitespace || $this->_isInline(
$current)) {
90 } elseif (!empty($this->currentNesting) &&
91 $this->currentNesting[count($this->currentNesting) - 1]->name ==
'p') {
117 if (!empty($this->currentNesting)) {
129 substr($prev->data, -2) ===
"\n\n" 182 if (!is_array($token)) {
183 $token =
array($token);
185 array_unshift($token,
new HTMLPurifier_Token_Text(
"\n\n"));
214 $raw_paragraphs = explode(
"\n\n",
$data);
215 $paragraphs =
array();
216 $needs_start =
false;
219 $c = count($raw_paragraphs);
226 for (
$i = 0;
$i < $c;
$i++) {
227 $par = $raw_paragraphs[
$i];
228 if (trim($par) !==
'') {
229 $paragraphs[] = $par;
252 } elseif (
$i + 1 == $c) {
262 if (empty($paragraphs)) {
272 foreach ($paragraphs as $par) {
300 return isset($this->htmlDefinition->info[
'p']->child->elements[$token->name]);
343 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...
Create styles array
The data for the language used.
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...
Concrete text token class.
_pLookAhead()
Looks ahead in the token list and determines whether or not we need to insert a.