Lines Matching +refs:text +refs:line
24 function text($text) function in Parsedown
30 $text = str_replace(array("\r\n", "\r"), "\n", $text);
33 $text = trim($text, "\n");
36 $lines = explode("\n", $text);
148 foreach ($lines as $line)
150 if (chop($line) === '')
160 if (strpos($line, "\t") !== false)
162 $parts = explode("\t", $line);
164 $line = $parts[0];
170 $shortage = 4 - mb_strlen($line, 'utf-8') % 4;
172 $line .= str_repeat(' ', $shortage);
173 $line .= $part;
179 while (isset($line[$indent]) and $line[$indent] === ' ')
184 $text = $indent > 0 ? substr($line, $indent) : $line;
188 $Line = array('body' => $line, 'indent' => $indent, 'text' => $text);
213 $marker = $text[0];
260 $CurrentBlock['element']['text'] .= "\n".$text;
329 $text = substr($Line['body'], 4);
337 'text' => $text,
359 $text = substr($Line['body'], 4);
361 $Block['element']['text']['text'] .= $text;
369 $text = $Block['element']['text']['text'];
371 $Block['element']['text']['text'] = $text;
496 $text = $Block['element']['text']['text'];
498 $Block['element']['text']['text'] = $text;
522 $text = trim($Line['text'], '# ');
527 'text' => $text,
593 $text = isset($matches[1]) ? $matches[1] : '';
599 $text,
615 $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']);
617 $Block['li']['text'] []= $text;
626 $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']);
628 $Block['li']['text'] []= $text;
1054 public function line($text, $nonNestables=array()) function in Parsedown
1060 while ($excerpt = strpbrk($text, $this->inlineMarkerList))
1064 $markerPosition = strpos($text, $marker);
1066 $Excerpt = array('text' => $excerpt, 'context' => $text);
1106 $unmarkedText = substr($text, 0, $Inline['position']);
1115 $text = substr($text, $Inline['position'] + $Inline['extent']);
1122 $unmarkedText = substr($text, 0, $markerPosition + 1);
1126 $text = substr($text, $markerPosition + 1);
1129 $markup .= $this->unmarkedText($text);
1144 $text = $matches[2];
1145 $text = preg_replace("/[ ]*\n/", ' ', $text);
1151 'text' => $text,
1451 protected function unmarkedText($text) argument
1455 $text = preg_replace('/[ ]*\n/', "<br />\n", $text);
1459 $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "<br />\n", $text);
1460 $text = str_replace(" \n", "\n", $text);
1463 return $text;
1496 $text = $Element['text'];
1502 $text = $Element['rawHtml'];
1507 if (isset($text))
1518 $markup .= $this->{$Element['handler']}($text, $Element['nonNestables']);
1522 $markup .= self::escape($text, true);
1526 $markup .= $text;
1578 function parse($text) argument
1580 $markup = $this->text($text);
1637 protected static function escape($text, $allowQuotes = false) argument
1639 return htmlspecialchars($text, $allowQuotes ? ENT_NOQUOTES : ENT_QUOTES, 'UTF-8');