27        $par->armor[
'MakeWellFormed_TagClosedError'] = 
true;
 
   39            if (empty($this->currentNesting) || strpos(
$text, 
"\n\n") !== 
false) {
 
   51                    if (!$token->is_whitespace || $this->_isInline(
$current)) {
 
   60                        $token = array($this->
_pStart());
 
   80                    $token = array($this->
_pStart(), $token);
 
   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" 
  134                            $token = array($this->
_pStart(), $token);
 
  150                            $token = array($this->
_pStart(), $token);
 
  169                    $token = array($this->
_pStart(), $token);
 
  182                        if (!is_array($token)) {
 
  183                            $token = array($token);
 
  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) {
 
An exception for terminatinating execution or to throw for unit testing.
Injector that auto paragraphs text in the root node based on double-spacing.
_splitText($data, &$result)
Splits up a text in paragraph tokens and appends them to the result stream that will replace the orig...
_isInline($token)
Returns true if passed token is inline (and, ergo, allowed in paragraph tags)
_pLookAhead()
Looks ahead in the token list and determines whether or not we need to insert a.
_checkNeedsP($current)
Determines if a particular token requires an earlier inline token to get a paragraph.
Injects tokens into the document while parsing for well-formedness.
forwardUntilEndToken(&$i, &$current, &$nesting)
Similar to _forward, but accepts a third parameter $nesting (which should be initialized at 0) and st...
backward(&$i, &$current)
Iterator function, starts with the previous token and continues until you reach the beginning of inpu...
allowsElement($name)
Tests if the context node allows a certain element.
Concrete end token class.
Concrete start token class.
Concrete text token class.