Initial commit
This commit is contained in:
		
							
								
								
									
										24
									
								
								content/inc/Parsing/ParserMode/Header.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								content/inc/Parsing/ParserMode/Header.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace dokuwiki\Parsing\ParserMode;
 | 
			
		||||
 | 
			
		||||
class Header extends AbstractMode
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    /** @inheritdoc */
 | 
			
		||||
    public function connectTo($mode)
 | 
			
		||||
    {
 | 
			
		||||
        //we're not picky about the closing ones, two are enough
 | 
			
		||||
        $this->Lexer->addSpecialPattern(
 | 
			
		||||
            '[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)',
 | 
			
		||||
            $mode,
 | 
			
		||||
            'header'
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /** @inheritdoc */
 | 
			
		||||
    public function getSort()
 | 
			
		||||
    {
 | 
			
		||||
        return 50;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user