1<?php
2/**
3 * Inline Element Syntax Component of the adhoctags Plugin
4 *
5 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author     Anika Henke <anika@selfthinker.org>
7 * @author     Sascha Leib <sascha.leib(at)kolmio.com>
8 */
9
10class syntax_plugin_adhoctags_abstractinline extends syntax_plugin_adhoctags_abstract {
11
12    protected $special_pattern	= '<%t%\b[^>\r\n]*?/>';
13    protected $entry_pattern	= '<%t%\b.*?>(?=.*?</%t%>)'; // '%t%' is the placeholder for the tag name
14    protected $exit_pattern		= '</%t%>';
15
16    function getAllowedTypes() { return array('formatting', 'substition', 'disabled'); }
17    function getPType(){ return 'normal';}
18
19
20	/* Inline elements have a much simpler unmatched handling */
21	function handleUnmatched($match, $state, $pos, Doku_Handler $handler) {
22		$handler->addCall('cdata', array($match), $pos);
23		return false;
24	}
25}