Changeset 30312 for documentation/trunk/wiki/plugins/simpletabs/syntax.php
- Timestamp:
- 2015-11-04T15:14:22+13:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/wiki/plugins/simpletabs/syntax.php
r30114 r30312 133 133 $this->Lexer->addPattern('<TAB>', 'plugin_simpletabs'); 134 134 $this->Lexer->addPattern('</TAB>', 'plugin_simpletabs'); 135 // Hide comments always (sometimes used as separator) 136 $this->Lexer->addPattern('<!--.*?-->', 'plugin_simpletabs'); 135 137 // Special things inside the content we want to manually handle. 136 138 $this->Lexer->addPattern( '^[ \t]*={2,6}\s?[^\n]+={2,6}[ \t]*(?=\n)', 'plugin_simpletabs'); … … 230 232 'bytepos' => $pos + strlen($match))); 231 233 } 234 if (preg_match('/<!--(.*)?-->/s', $match, $matches)) 235 { 236 $this->_debugPrint("Handler=>comment: " . htmlspecialchars($matches[1])); 237 $params = array(); 238 $params['action'] = 'comment'; 239 $params['comment'] = $matches[1]; 240 return array($state, $params); 241 } 232 242 if (preg_match('/(={2,6})\s*(.+?)\s*={2,6}/', $match, $matches)) 233 243 { … … 249 259 250 260 case DOKU_LEXER_UNMATCHED: 251 $this->_debugPrint("Handler=>unmatched: " . $match);261 $this->_debugPrint("Handler=>unmatched: " . htmlspecialchars($match)); 252 262 return array($state, $match); 253 263 break; … … 313 323 if ($this->divide_edit_section && method_exists($renderer, 'startSectionEdit')) 314 324 { 315 $extra_classy = $renderer->startSectionEdit($params['bytepos'], 'plugin_simpletabs');325 $extra_classy = ' ' . $renderer->startSectionEdit($params['bytepos'], 'plugin_simpletabs'); 316 326 } 317 $renderer->doc .= ' <div id="simpletabs-tc' . $params['tab_area_id'] . '_' . $params['tab_number'] . '" class="tab ' . $extra_classy . '"';327 $renderer->doc .= ' <div id="simpletabs-tc' . $params['tab_area_id'] . '_' . $params['tab_number'] . '" class="tab' . $extra_classy . '"'; 318 328 if (!$params['active']) 319 329 { … … 332 342 $renderer->doc .= '</div>'; 333 343 break; 344 case 'comment': 345 $renderer->doc .= '<!-- ' . $params['comment'] . ' -->'; 346 break; 334 347 case 'heading': 335 348 $renderer->doc .= '<h' . $params['level'] . '>' . $params['title'] . '</h' . $params['level'] . '>';
Note:
See TracChangeset
for help on using the changeset viewer.