Lines Matching refs:this

210 			return $this->TextileThis($text, $lite);
259 $this->_initDetab();
260 $this->prepareItalicsAndBold();
262 $this->nested_brackets_re =
263 str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth).
264 str_repeat('\])*', $this->nested_brackets_depth);
266 $this->nested_url_parenthesis_re =
267 str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth).
268 str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth);
270 $this->escape_chars_re = '['.preg_quote($this->escape_chars).']';
273 asort($this->document_gamut);
274 asort($this->block_gamut);
275 asort($this->span_gamut);
294 $this->urls = $this->predef_urls;
295 $this->titles = $this->predef_titles;
296 $this->html_hashes = array();
298 $this->in_anchor = false;
306 $this->urls = array();
307 $this->titles = array();
308 $this->html_hashes = array();
317 $this->setup();
330 $text = $this->detab($text);
333 $text = $this->hashHTMLBlocks($text);
342 foreach ($this->document_gamut as $method => $priority) {
343 $text = $this->$method($text);
346 $this->teardown();
364 $less_than_tab = $this->tab_width - 1;
389 array(&$this, '_stripLinkDefinitions_callback'),
396 $this->urls[$link_id] = $url;
397 $this->titles[$link_id] =& $matches[4];
403 if ($this->no_markup) return $text;
405 $less_than_tab = $this->tab_width - 1;
536 array(&$this, '_hashHTMLBlocks_callback'),
543 $key = $this->hashBlock($text);
561 $text = $this->unhash($text);
566 $this->html_hashes[$key] = $text;
575 return $this->hashPart($text, 'B');
601 $text = $this->hashHTMLBlocks($text);
603 return $this->runBasicBlockGamut($text);
612 foreach ($this->block_gamut as $method => $priority) {
613 $text = $this->$method($text);
617 $text = $this->formParagraphs($text);
636 "\n".$this->hashBlock("<hr$this->empty_element_suffix")."\n",
669 foreach ($this->span_gamut as $method => $priority) {
670 $text = $this->$method($text);
680 array(&$this, '_doHardBreaks_callback'), $text);
683 return $this->hashPart("<br$this->empty_element_suffix\n");
691 if ($this->in_anchor) return $text;
692 $this->in_anchor = true;
700 ('.$this->nested_brackets_re.') # link text = $2
711 array(&$this, '_doAnchors_reference_callback'), $text);
719 ('.$this->nested_brackets_re.') # link text = $2
726 ('.$this->nested_url_parenthesis_re.') # href = $4
738 array(&$this, '_doAnchors_inline_callback'), $text);
752 array(&$this, '_doAnchors_reference_callback'), $text);
754 $this->in_anchor = false;
771 if (isset($this->urls[$link_id])) {
772 $url = $this->urls[$link_id];
773 $url = $this->encodeAttribute($url);
776 if ( isset( $this->titles[$link_id] ) ) {
777 $title = $this->titles[$link_id];
778 $title = $this->encodeAttribute($title);
782 $link_text = $this->runSpanGamut($link_text);
784 $result = $this->hashPart($result);
793 $link_text = $this->runSpanGamut($matches[2]);
797 $url = $this->encodeAttribute($url);
801 $title = $this->encodeAttribute($title);
805 $link_text = $this->runSpanGamut($link_text);
808 return $this->hashPart($result);
822 ('.$this->nested_brackets_re.') # alt text = $2
834 array(&$this, '_doImages_reference_callback'), $text);
843 ('.$this->nested_brackets_re.') # alt text = $2
851 ('.$this->nested_url_parenthesis_re.') # src url = $4
863 array(&$this, '_doImages_inline_callback'), $text);
876 $alt_text = $this->encodeAttribute($alt_text);
877 if (isset($this->urls[$link_id])) {
878 $url = $this->encodeAttribute($this->urls[$link_id]);
880 if (isset($this->titles[$link_id])) {
881 $title = $this->titles[$link_id];
882 $title = $this->encodeAttribute($title);
885 $result .= $this->empty_element_suffix;
886 $result = $this->hashPart($result);
901 $alt_text = $this->encodeAttribute($alt_text);
902 $url = $this->encodeAttribute($url);
905 $title = $this->encodeAttribute($title);
908 $result .= $this->empty_element_suffix;
910 return $this->hashPart($result);
923 array(&$this, '_doHeaders_callback_setext'), $text);
940 array(&$this, '_doHeaders_callback_atx'), $text);
950 $block = "<h$level>".$this->runSpanGamut($matches[1])."</h$level>";
951 return "\n" . $this->hashBlock($block) . "\n\n";
955 $block = "<h$level>".$this->runSpanGamut($matches[2])."</h$level>";
956 return "\n" . $this->hashBlock($block) . "\n\n";
964 $less_than_tab = $this->tab_width - 1;
1008 if ($this->list_level) {
1013 array(&$this, '_doLists_callback'), $text);
1020 array(&$this, '_doLists_callback'), $text);
1038 $result = $this->processListItems($list, $marker_any_re);
1040 $result = $this->hashBlock("<$list_type>\n" . $result . "</$list_type>");
1072 $this->list_level++;
1087 array(&$this, '_processListItems_callback'), $list_str);
1089 $this->list_level--;
1104 $item = $this->runBlockGamut($this->outdent($item)."\n");
1108 $item = $this->doLists($this->outdent($item));
1110 $item = $this->runSpanGamut($item);
1125 [ ]{'.$this->tab_width.'} # Lines must start with a tab or a tab-width of spaces
1129 ((?=^[ ]{0,'.$this->tab_width.'}\S)|\Z) # Lookahead for non-space at line-start, or end of doc
1131 array(&$this, '_doCodeBlocks_callback'), $text);
1138 $codeblock = $this->outdent($codeblock);
1145 return "\n\n".$this->hashBlock($codeblock)."\n\n";
1154 return $this->hashPart("<code>$code</code>");
1180 foreach ($this->em_relist as $em => $em_re) {
1181 foreach ($this->strong_relist as $strong => $strong_re) {
1184 if (isset($this->em_strong_relist["$em$strong"])) {
1185 $token_relist[] = $this->em_strong_relist["$em$strong"];
1192 $this->em_strong_prepared_relist["$em$strong"] = $token_re;
1209 $token_re = $this->em_strong_prepared_relist["$em$strong"];
1237 $span = $this->runSpanGamut($span);
1239 $text_stack[0] .= $this->hashPart($span);
1248 $span = $this->runSpanGamut($span);
1250 $text_stack[0] = $this->hashPart($span);
1262 $span = $this->runSpanGamut($span);
1264 $text_stack[0] .= $this->hashPart($span);
1286 $span = $this->runSpanGamut($span);
1288 $text_stack[0] .= $this->hashPart($span);
1302 $span = $this->runSpanGamut($span);
1304 $text_stack[0] .= $this->hashPart($span);
1331 array(&$this, '_doBlockQuotes_callback'), $text);
1339 $bq = $this->runBlockGamut($bq); # recurse
1345 array(&$this, '_doBlockQuotes_callback2'), $bq);
1347 return "\n". $this->hashBlock("<blockquote>\n$bq\n</blockquote>")."\n\n";
1372 $value = $this->runSpanGamut($value);
1375 $grafs[$key] = $this->unhash($value);
1381 $block = $this->html_hashes[$graf];
1431 $text = $this->encodeAmpsAndAngles($text);
1443 if ($this->no_entities) {
1460 array(&$this, '_doAutoLinks_url_callback'), $text);
1481 array(&$this, '_doAutoLinks_email_callback'), $text);
1482 …$text = preg_replace_callback('{<(tel:([^\'">\s]+))>}i',array(&$this, '_doAutoLinks_tel_callback')…
1487 $url = $this->encodeAttribute($matches[1]);
1488 $tel = $this->encodeAttribute($matches[2]);
1490 return $this->hashPart($link);
1493 $url = $this->encodeAttribute($matches[1]);
1495 return $this->hashPart($link);
1499 $link = $this->encodeEmailAddress($address);
1500 return $this->hashPart($link);
1554 \\\\'.$this->escape_chars_re.'
1558 '.( $this->no_markup ? '' : '
1593 $output .= $this->handleSpanToken($parts[1], $parts[2]);
1612 return $this->hashPart("&#". ord($token{1}). ";");
1619 $codespan = $this->makeCodeSpan($matches[1]);
1620 return $this->hashPart($codespan);
1624 return $this->hashPart($token);
1633 return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text);
1650 array(&$this, '_detab_callback'), $text);
1656 $strlen = $this->utf8_strlen; # strlen function for UTF-8.
1665 $amount = $this->tab_width -
1666 $strlen($line, 'UTF-8') % $this->tab_width;
1678 if (function_exists($this->utf8_strlen)) return;
1679 $this->utf8_strlen = create_function('$text', 'return preg_match_all(
1690 array(&$this, '_unhash_callback'), $text);
1693 return $this->html_hashes[$matches[0]];
1736 $this->escape_chars .= ':|';
1740 $this->document_gamut += array(
1746 $this->block_gamut += array(
1751 $this->span_gamut += array(
1778 $this->footnotes = array();
1779 $this->footnotes_ordered = array();
1780 $this->footnotes_ref_count = array();
1781 $this->footnotes_numbers = array();
1782 $this->abbr_desciptions = array();
1783 $this->abbr_word_re = '';
1784 $this->footnote_counter = 1;
1786 foreach ($this->predef_abbr as $abbr_word => $abbr_desc) {
1787 if ($this->abbr_word_re)
1788 $this->abbr_word_re .= '|';
1789 $this->abbr_word_re .= preg_quote($abbr_word);
1790 $this->abbr_desciptions[$abbr_word] = trim($abbr_desc);
1798 $this->footnotes = array();
1799 $this->footnotes_ordered = array();
1800 $this->footnotes_ref_count = array();
1801 $this->footnotes_numbers = array();
1802 $this->abbr_desciptions = array();
1803 $this->abbr_word_re = '';
1857 $less_than_tab = $this->tab_width - 1;
1880 (?:[ ]* '.$this->id_class_attr_catch_re.' )? # $5 = extra id & class attr
1883 array(&$this, '_stripLinkDefinitions_callback'),
1890 $this->urls[$link_id] = $url;
1891 $this->titles[$link_id] =& $matches[4];
1892 $this->ref_attr[$link_id] = $this->doExtraAttributes("", $dummy =& $matches[5]);
1932 if ($this->no_markup) return $text;
1937 list($text, ) = $this->_hashHTMLBlocks_inMarkdown($text);
1986 '.$this->block_tags_re.' |
1987 '.$this->context_block_tags_re.' |
1988 '.$this->clean_tags_re.' |
2022 '.$this->id_class_attr_nocatch_re.' # extra attributes
2057 $void = $this->hashPart("", ':');
2079 …if (preg_match('{^\n?([ ]{0,'.($indent+3).'})(~{3,}|`{3,})[ ]*(?:\.?[-_:a-zA-Z0-9]+|'.$this->id_cl…
2127 else if (preg_match('{^<(?:'.$this->block_tags_re.')\b}', $tag) ||
2128 ( preg_match('{^<(?:'.$this->context_block_tags_re.')\b}', $tag) &&
2135 $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true);
2144 else if (preg_match('{^<(?:'.$this->clean_tags_re.')\b}', $tag) ||
2150 $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false);
2280 if (preg_match('{^</?(?:'.$this->auto_close_tags_re.')\b}', $tag) ||
2307 $this->mode = $attr_m[2] . $attr_m[3];
2308 $span_mode = $this->mode == 'span' || $this->mode != 'block' &&
2309 preg_match('{^<(?:'.$this->contain_span_tags_re.')\b}', $tag);
2313 $strlen = $this->utf8_strlen;
2321 $parsed .= $this->$hash_method($block_text);
2330 = $this->_hashHTMLBlocks_inMarkdown($text, $indent,
2354 $parsed .= $this->$hash_method($block_text);
2366 return $this->hashPart($text, 'C');
2374 if ($this->in_anchor) return $text;
2375 $this->in_anchor = true;
2383 ('.$this->nested_brackets_re.') # link text = $2
2394 array(&$this, '_doAnchors_reference_callback'), $text);
2402 ('.$this->nested_brackets_re.') # link text = $2
2409 ('.$this->nested_url_parenthesis_re.') # href = $4
2419 (?:[ ]? '.$this->id_class_attr_catch_re.' )? # $8 = id/class attributes
2422 array(&$this, '_doAnchors_inline_callback'), $text);
2436 array(&$this, '_doAnchors_reference_callback'), $text);
2438 $this->in_anchor = false;
2455 if (isset($this->urls[$link_id])) {
2456 $url = $this->urls[$link_id];
2457 $url = $this->encodeAttribute($url);
2460 if ( isset( $this->titles[$link_id] ) ) {
2461 $title = $this->titles[$link_id];
2462 $title = $this->encodeAttribute($title);
2465 if (isset($this->ref_attr[$link_id]))
2466 $result .= $this->ref_attr[$link_id];
2468 $link_text = $this->runSpanGamut($link_text);
2470 $result = $this->hashPart($result);
2479 $link_text = $this->runSpanGamut($matches[2]);
2482 $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]);
2485 $url = $this->encodeAttribute($url);
2489 $title = $this->encodeAttribute($title);
2494 $link_text = $this->runSpanGamut($link_text);
2497 return $this->hashPart($result);
2511 ('.$this->nested_brackets_re.') # alt text = $2
2523 array(&$this, '_doImages_reference_callback'), $text);
2532 ('.$this->nested_brackets_re.') # alt text = $2
2540 ('.$this->nested_url_parenthesis_re.') # src url = $4
2550 (?:[ ]? '.$this->id_class_attr_catch_re.' )? # $8 = id/class attributes
2553 array(&$this, '_doImages_inline_callback'), $text);
2566 $alt_text = $this->encodeAttribute($alt_text);
2567 if (isset($this->urls[$link_id])) {
2568 $url = $this->encodeAttribute($this->urls[$link_id]);
2570 if (isset($this->titles[$link_id])) {
2571 $title = $this->titles[$link_id];
2572 $title = $this->encodeAttribute($title);
2575 if (isset($this->ref_attr[$link_id]))
2576 $result .= $this->ref_attr[$link_id];
2577 $result .= $this->empty_element_suffix;
2578 $result = $this->hashPart($result);
2592 $attr = $this->doExtraAttributes("img", $dummy =& $matches[8]);
2594 $alt_text = $this->encodeAttribute($alt_text);
2595 $url = $this->encodeAttribute($url);
2598 $title = $this->encodeAttribute($title);
2602 $result .= $this->empty_element_suffix;
2604 return $this->hashPart($result);
2622 (?:[ ]+ '.$this->id_class_attr_catch_re.' )? # $3 = id/class attributes
2625 array(&$this, '_doHeaders_callback_setext'), $text);
2640 (?:[ ]+ '.$this->id_class_attr_catch_re.' )? # $3 = id/class attributes
2644 array(&$this, '_doHeaders_callback_atx'), $text);
2652 $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[2]);
2653 $block = "<h$level$attr>".$this->runSpanGamut($matches[1])."</h$level>";
2654 return "\n" . $this->hashBlock($block) . "\n\n";
2658 $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[3]);
2659 $block = "<h$level$attr>".$this->runSpanGamut($matches[2])."</h$level>";
2660 return "\n" . $this->hashBlock($block) . "\n\n";
2668 $less_than_tab = $this->tab_width - 1;
2695 array(&$this, '_doTable_leadingPipe_callback'), $text);
2721 array(&$this, '_DoTable_callback'), $text);
2733 return $this->_doTable_callback(array($matches[0], $head, $underline, $content));
2756 $head = $this->parseSpan($head);
2766 $text .= " <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n";
2777 $row = $this->parseSpan($row);
2785 $text .= " <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n";
2791 return $this->hashBlock($text) . "\n";
2799 $less_than_tab = $this->tab_width - 1;
2833 array(&$this, '_doDefLists_callback'), $text);
2843 $result = trim($this->processDefListItems($list));
2845 return $this->hashBlock($result) . "\n\n";
2854 $less_than_tab = $this->tab_width - 1;
2871 array(&$this, '_processDefListItems_callback_dt'), $list_str);
2888 array(&$this, '_processDefListItems_callback_dd'), $list_str);
2896 $term = $this->runSpanGamut(trim($term));
2909 $def = $this->runBlockGamut($this->outdent($def . "\n\n"));
2914 $def = $this->runSpanGamut($this->outdent($def));
2929 $less_than_tab = $this->tab_width;
2941 '.$this->id_class_attr_catch_re.' # 3: Extra attributes
2956 array(&$this, '_doFencedCodeBlocks_callback'), $text);
2966 array(&$this, '_doFencedCodeBlocks_newlines'), $codeblock);
2971 $attr_str = ' class="'.$this->code_class_prefix.$classname.'"';
2973 $attr_str = $this->doExtraAttributes($this->code_attr_on_pre ? "pre" : "code", $attrs);
2975 $pre_attr_str = $this->code_attr_on_pre ? $attr_str : '';
2976 $code_attr_str = $this->code_attr_on_pre ? '' : $attr_str;
2979 return "\n\n".$this->hashBlock($codeblock)."\n\n";
2982 return str_repeat("<br$this->empty_element_suffix",
3022 $value = trim($this->runSpanGamut($value));
3038 $text = $this->unhash($text);
3051 $less_than_tab = $this->tab_width - 1;
3069 array(&$this, '_stripFootnotes_callback'),
3074 $note_id = $this->fn_id_prefix . $matches[1];
3075 $this->footnotes[$note_id] = $this->outdent($matches[2]);
3085 if (!$this->in_anchor) {
3097 array(&$this, '_appendFootnotes_callback'), $text);
3099 if (!empty($this->footnotes_ordered)) {
3102 $text .= "<hr". $this->empty_element_suffix ."\n";
3106 if ($this->fn_backlink_class != "") {
3107 $class = $this->fn_backlink_class;
3108 $class = $this->encodeAttribute($class);
3111 if ($this->fn_backlink_title != "") {
3112 $title = $this->fn_backlink_title;
3113 $title = $this->encodeAttribute($title);
3118 while (!empty($this->footnotes_ordered)) {
3119 $footnote = reset($this->footnotes_ordered);
3120 $note_id = key($this->footnotes_ordered);
3121 unset($this->footnotes_ordered[$note_id]);
3122 $ref_count = $this->footnotes_ref_count[$note_id];
3123 unset($this->footnotes_ref_count[$note_id]);
3124 unset($this->footnotes[$note_id]);
3127 $footnote = $this->runBlockGamut("$footnote\n");
3129 array(&$this, '_appendFootnotes_callback'), $footnote);
3132 $note_id = $this->encodeAttribute($note_id);
3157 $node_id = $this->fn_id_prefix . $matches[1];
3161 if (isset($this->footnotes[$node_id])) {
3162 $num =& $this->footnotes_numbers[$node_id];
3166 $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id];
3167 $this->footnotes_ref_count[$node_id] = 1;
3168 $num = $this->footnote_counter++;
3171 $ref_count_mark = $this->footnotes_ref_count[$node_id] += 1;
3175 if ($this->fn_link_class != "") {
3176 $class = $this->fn_link_class;
3177 $class = $this->encodeAttribute($class);
3180 if ($this->fn_link_title != "") {
3181 $title = $this->fn_link_title;
3182 $title = $this->encodeAttribute($title);
3187 $node_id = $this->encodeAttribute($node_id);
3205 $less_than_tab = $this->tab_width - 1;
3212 array(&$this, '_stripAbbreviations_callback'),
3219 if ($this->abbr_word_re)
3220 $this->abbr_word_re .= '|';
3221 $this->abbr_word_re .= preg_quote($abbr_word);
3222 $this->abbr_desciptions[$abbr_word] = trim($abbr_desc);
3231 if ($this->abbr_word_re) {
3236 '(?:'.$this->abbr_word_re.')'.
3239 array(&$this, '_doAbbreviations_callback'), $text);
3245 if (isset($this->abbr_desciptions[$abbr])) {
3246 $desc = $this->abbr_desciptions[$abbr];
3248 return $this->hashPart("<abbr>$abbr</abbr>");
3250 $desc = $this->encodeAttribute($desc);
3251 return $this->hashPart("<abbr title=\"$desc\">$abbr</abbr>");