Lines Matching refs:text

59 function Markdown($text) {  argument
71 return $parser->transform($text);
113 function mdwp_MarkdownPost($text) { argument
124 return $parser->transform($text);
150 function mdwp_add_p($text) { argument
151 if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) {
152 $text = '<p>'.$text.'</p>';
153 $text = preg_replace('{\n{2,}}', "</p>\n\n<p>", $text);
155 return $text;
160 function mdwp_hide_tags($text) { argument
162 return str_replace($mdwp_hidden_tags, $mdwp_placeholders, $text);
164 function mdwp_show_tags($text) { argument
166 return str_replace($mdwp_placeholders, $mdwp_hidden_tags, $text);
189 function smarty_modifier_markdown($text) { argument
190 return Markdown($text);
203 function TextileThis($text, $lite='', $encode='') { argument
204 if ($lite == '' && $encode == '') $text = Markdown($text);
205 if (function_exists('SmartyPants')) $text = SmartyPants($text);
206 return $text;
209 function TextileRestricted($text, $lite='', $noimage='') { argument
210 return $this->TextileThis($text, $lite);
213 function blockLite($text) { return $text; } argument
312 function transform($text) { argument
320 $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text);
324 $text = preg_replace('{\r\n?}', "\n", $text);
327 $text .= "\n\n";
330 $text = $this->detab($text);
333 $text = $this->hashHTMLBlocks($text);
339 $text = preg_replace('/^[ ]+$/m', '', $text);
343 $text = $this->$method($text);
348 return $text . "\n";
359 function stripLinkDefinitions($text) { argument
367 $text = preg_replace_callback('{
390 $text);
391 return $text;
402 function hashHTMLBlocks($text) { argument
403 if ($this->no_markup) return $text;
475 $text = preg_replace_callback('{(?>
537 $text);
539 return $text;
542 $text = $matches[1];
543 $key = $this->hashBlock($text);
548 function hashPart($text, $boundary = 'X') { argument
561 $text = $this->unhash($text);
566 $this->html_hashes[$key] = $text;
571 function hashBlock($text) { argument
575 return $this->hashPart($text, 'B');
592 function runBlockGamut($text) { argument
601 $text = $this->hashHTMLBlocks($text);
603 return $this->runBasicBlockGamut($text);
606 function runBasicBlockGamut($text) { argument
613 $text = $this->$method($text);
617 $text = $this->formParagraphs($text);
619 return $text;
623 function doHorizontalRules($text) { argument
637 $text);
665 function runSpanGamut($text) { argument
670 $text = $this->$method($text);
673 return $text;
677 function doHardBreaks($text) { argument
680 array(&$this, '_doHardBreaks_callback'), $text);
687 function doAnchors($text) { argument
691 if ($this->in_anchor) return $text;
697 $text = preg_replace_callback('{
711 array(&$this, '_doAnchors_reference_callback'), $text);
716 $text = preg_replace_callback('{
738 array(&$this, '_doAnchors_inline_callback'), $text);
745 $text = preg_replace_callback('{
752 array(&$this, '_doAnchors_reference_callback'), $text);
755 return $text;
812 function doImages($text) { argument
819 $text = preg_replace_callback('{
834 array(&$this, '_doImages_reference_callback'), $text);
840 $text = preg_replace_callback('{
863 array(&$this, '_doImages_inline_callback'), $text);
865 return $text;
914 function doHeaders($text) { argument
922 $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx',
923 array(&$this, '_doHeaders_callback_setext'), $text);
932 $text = preg_replace_callback('{
940 array(&$this, '_doHeaders_callback_atx'), $text);
942 return $text;
960 function doLists($text) { argument
1009 $text = preg_replace_callback('{
1013 array(&$this, '_doLists_callback'), $text);
1016 $text = preg_replace_callback('{
1020 array(&$this, '_doLists_callback'), $text);
1024 return $text;
1117 function doCodeBlocks($text) { argument
1121 $text = preg_replace_callback('{
1131 array(&$this, '_doCodeBlocks_callback'), $text);
1133 return $text;
1197 function doItalicsAndBold($text) { argument
1215 $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE);
1218 $text =& $parts[2];
1320 function doBlockQuotes($text) { argument
1321 $text = preg_replace_callback('/
1331 array(&$this, '_doBlockQuotes_callback'), $text);
1333 return $text;
1356 function formParagraphs($text) { argument
1362 $text = preg_replace('/\A\n+|\n+\z/', '', $text);
1364 $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY);
1426 function encodeAttribute($text) { argument
1431 $text = $this->encodeAmpsAndAngles($text);
1432 $text = str_replace('"', '&quot;', $text);
1433 return $text;
1437 function encodeAmpsAndAngles($text) { argument
1444 $text = str_replace('&', '&amp;', $text);
1448 $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/',
1449 '&amp;', $text);;
1452 $text = str_replace('<', '&lt;', $text);
1454 return $text;
1458 function doAutoLinks($text) { argument
1459 $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i',
1460 array(&$this, '_doAutoLinks_url_callback'), $text);
1463 $text = preg_replace_callback('{
1481 array(&$this, '_doAutoLinks_email_callback'), $text);
1482 …$text = preg_replace_callback('{<(tel:([^\'">\s]+))>}i',array(&$this, '_doAutoLinks_tel_callback')…
1484 return $text;
1538 $text = implode('', array_slice($chars, 7)); # text without `mailto:`
1539 $addr = "<a href=\"$addr\">$text</a>";
1629 function outdent($text) { argument
1633 return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text);
1641 function detab($text) { argument
1649 $text = preg_replace_callback('/^.*\t.*$/m',
1650 array(&$this, '_detab_callback'), $text);
1652 return $text;
1685 function unhash($text) { argument
1690 array(&$this, '_unhash_callback'), $text);
1852 function stripLinkDefinitions($text) { argument
1860 $text = preg_replace_callback('{
1884 $text);
1885 return $text;
1916 function hashHTMLBlocks($text) { argument
1932 if ($this->no_markup) return $text;
1937 list($text, ) = $this->_hashHTMLBlocks_inMarkdown($text);
1939 return $text;
1941 function _hashHTMLBlocks_inMarkdown($text, $indent = 0, argument
1969 if ($text === '') return array('', '');
2051 $parts = preg_split($block_tag_re, $text, 2,
2066 $text = "";
2071 $text = $parts[2]; # Remaining text after current tag.
2083 if (preg_match('{^(?>.*\n)*?[ ]{'.($fence_indent).'}'.$fence_re.'[ ]*(?:\n|$)}', $text,
2088 $text = substr($text, strlen($matches[0]));
2111 $text, $matches))
2115 $text = substr($text, strlen($matches[0]));
2130 preg_match($newline_after_re, $text) )
2134 list($block_text, $text) =
2135 $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true);
2149 list($block_text, $text) =
2150 $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false);
2172 $text = $tag . $text;
2183 return array($parsed, $text);
2185 function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { argument
2196 if ($text === '') return array('', '');
2237 $original_text = $text; # Save original text in case of faliure.
2247 if (preg_match('/^<([\w:$]*)\b/', $text, $matches))
2260 $parts = preg_split($tag_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE);
2274 $text = $parts[2]; # Remaining text after current tag.
2329 list ($block_text, $text)
2330 = $this->_hashHTMLBlocks_inMarkdown($text, $indent,
2356 return array($parsed, $text);
2360 function hashClean($text) { argument
2366 return $this->hashPart($text, 'C');
2370 function doAnchors($text) { argument
2374 if ($this->in_anchor) return $text;
2380 $text = preg_replace_callback('{
2394 array(&$this, '_doAnchors_reference_callback'), $text);
2399 $text = preg_replace_callback('{
2422 array(&$this, '_doAnchors_inline_callback'), $text);
2429 $text = preg_replace_callback('{
2436 array(&$this, '_doAnchors_reference_callback'), $text);
2439 return $text;
2501 function doImages($text) { argument
2508 $text = preg_replace_callback('{
2523 array(&$this, '_doImages_reference_callback'), $text);
2529 $text = preg_replace_callback('{
2553 array(&$this, '_doImages_inline_callback'), $text);
2555 return $text;
2608 function doHeaders($text) { argument
2619 $text = preg_replace_callback(
2625 array(&$this, '_doHeaders_callback_setext'), $text);
2634 $text = preg_replace_callback('{
2644 array(&$this, '_doHeaders_callback_atx'), $text);
2646 return $text;
2664 function doTables($text) { argument
2677 $text = preg_replace_callback('
2695 array(&$this, '_doTable_leadingPipe_callback'), $text);
2705 $text = preg_replace_callback('
2721 array(&$this, '_DoTable_callback'), $text);
2723 return $text;
2762 $text = "<table>\n";
2763 $text .= "<thead>\n";
2764 $text .= "<tr>\n";
2766 $text .= " <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n";
2767 $text .= "</tr>\n";
2768 $text .= "</thead>\n";
2773 $text .= "<tbody>\n";
2783 $text .= "<tr>\n";
2785 $text .= " <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n";
2786 $text .= "</tr>\n";
2788 $text .= "</tbody>\n";
2789 $text .= "</table>";
2791 return $this->hashBlock($text) . "\n";
2795 function doDefLists($text) { argument
2829 $text = preg_replace_callback('{
2833 array(&$this, '_doDefLists_callback'), $text);
2835 return $text;
2894 $text = '';
2897 $text .= "\n<dt>" . $term . "</dt>";
2899 return $text . "\n";
2921 function doFencedCodeBlocks($text) { argument
2931 $text = preg_replace_callback('{
2956 array(&$this, '_doFencedCodeBlocks_callback'), $text);
2958 return $text;
3008 function formParagraphs($text) { argument
3014 $text = preg_replace('/\A\n+|\n+\z/', '', $text);
3016 $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY);
3035 $text = implode("\n\n", $grafs);
3038 $text = $this->unhash($text);
3040 return $text;
3046 function stripFootnotes($text) { argument
3054 $text = preg_replace_callback('{
3070 $text);
3071 return $text;
3080 function doFootnotes($text) { argument
3086 $text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text);
3088 return $text;
3092 function appendFootnotes($text) { argument
3096 $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}',
3097 array(&$this, '_appendFootnotes_callback'), $text);
3100 $text .= "\n\n";
3101 $text .= "<div class=\"footnotes\">\n";
3102 $text .= "<hr". $this->empty_element_suffix ."\n";
3103 $text .= "<ol>\n\n";
3146 $text .= "<li id=\"fn:$note_id\">\n";
3147 $text .= $footnote . "\n";
3148 $text .= "</li>\n\n";
3151 $text .= "</ol>\n";
3152 $text .= "</div>";
3154 return $text;
3201 function stripAbbreviations($text) { argument
3208 $text = preg_replace_callback('{
3213 $text);
3214 return $text;
3227 function doAbbreviations($text) { argument
3234 $text = preg_replace_callback('{'.
3239 array(&$this, '_doAbbreviations_callback'), $text);
3241 return $text;