equal
deleted
inserted
replaced
19 'templates' => '', |
19 'templates' => '', |
20 'bold' => '<strong>\\1</strong>', |
20 'bold' => '<strong>\\1</strong>', |
21 'italic' => '<em>\\1</em>', |
21 'italic' => '<em>\\1</em>', |
22 'underline' => '<span style="text-decoration: underline;">\\1</span>', |
22 'underline' => '<span style="text-decoration: underline;">\\1</span>', |
23 'externalwithtext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\2</a>', |
23 'externalwithtext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\2</a>', |
24 'externalnotext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\1</a>', |
24 'externalnotext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\1</a>' |
25 ); |
25 ); |
26 |
26 |
27 public function heading($text, $pieces) |
27 public function heading($text, $pieces) |
28 { |
28 { |
29 static $tocid = -1; |
29 static $tocid = -1; |
58 case 'indent': |
58 case 'indent': |
59 $btag = 'dl'; |
59 $btag = 'dl'; |
60 $itag = 'dd'; |
60 $itag = 'dd'; |
61 break; |
61 break; |
62 } |
62 } |
63 $list = "<$btag>\n"; |
63 $list = "<_paragraph_bypass><$btag>\n"; |
64 $spacing = ''; |
64 $spacing = ''; |
65 $depth = 1; |
65 $depth = 1; |
66 foreach ( $piece['items'] as $j => $item ) |
66 foreach ( $piece['items'] as $j => $item ) |
67 { |
67 { |
68 // most of this just goes into pretty formatting. |
68 // most of this just goes into pretty formatting. |
106 $spacing = substr($spacing, 4); |
106 $spacing = substr($spacing, 4); |
107 $list .= "{$spacing}</$itag>\n"; |
107 $list .= "{$spacing}</$itag>\n"; |
108 $spacing = substr($spacing, 4); |
108 $spacing = substr($spacing, 4); |
109 $depth--; |
109 $depth--; |
110 } |
110 } |
111 $list .= "</$btag>\n"; |
111 $list .= "</$btag></_paragraph_bypass>\n"; |
112 $text = str_replace(Carpenter::generate_token($i), $list, $text); |
112 $text = str_replace(Carpenter::generate_token($i), $list, $text); |
|
113 } |
|
114 return $text; |
|
115 } |
|
116 |
|
117 public function blockquote($text, $pieces) |
|
118 { |
|
119 foreach ( $pieces as $i => $piece ) |
|
120 { |
|
121 $text = str_replace(Carpenter::generate_token($i), "<blockquote>\n" . nl2br($piece) . "\n</blockquote>\n", $text); |
113 } |
122 } |
114 return $text; |
123 return $text; |
115 } |
124 } |
116 |
125 |
117 public function paragraph($text, $pieces) |
126 public function paragraph($text, $pieces) |