1<?php 2 3// This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License. 4// See <jquery.syntax.js> for licensing details. 5// Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz> 6 7if(!defined('DOKU_INC')) die(); 8if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 9 10require_once dirname(__FILE__).'/code.php'; 11 12class syntax_plugin_jquerysyntax_file extends syntax_plugin_jquerysyntax_code { 13 function getInfo() { 14 return array( 15 'author' => 'Samuel Williams', 16 'email' => 'samuel.williams@oriontransfer.co.nz', 17 'date' => '2012-06-01', 18 'name' => 'jQuery.Syntax', 19 'desc' => "Extreme Client-side Syntax Highlighting. Replaces DokuWiki's <file> handler.", 20 'url' => 'http://www.oriontransfer.co.nz/software/jquery-syntax', 21 ); 22 } 23 24 function connectTo($mode) { 25 $this->Lexer->addEntryPattern('<file(?=[^\r\n]*?>.*?</file>)',$mode,'plugin_jquerysyntax_file'); 26 } 27 28 function postConnect() { 29 $this->Lexer->addExitPattern('</file>', 'plugin_jquerysyntax_file'); 30 } 31} 32