dokuwiki-gnuplot-plugin – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 19... | Line 19... | |||
19 | |
19 | |
|
20 | /** |
20 | /** |
|
21 | * All DokuWiki plugins to extend the parser/rendering mechanism |
21 | * All DokuWiki plugins to extend the parser/rendering mechanism |
|
22 | * need to inherit from this class |
22 | * need to inherit from this class |
|
23 | */ |
23 | */ |
|
24 | class syntax_plugin_plot extends DokuWiki_Syntax_Plugin { |
24 | class syntax_plugin_plotwas extends DokuWiki_Syntax_Plugin { |
|
25 | /** |
25 | /** |
|
26 | * What kind of syntax are we? |
26 | * What kind of syntax are we? |
|
27 | */ |
27 | */ |
|
28 | //function accepts($m) { return true; } |
28 | //function accepts($m) { return true; } |
|
Line 32... | Line 32... | |||
32 | |
32 | |
|
33 | /** |
33 | /** |
|
34 | * Connect pattern to lexer |
34 | * Connect pattern to lexer |
|
35 | */ |
35 | */ |
|
36 | function connectTo($mode) { |
36 | function connectTo($mode) { |
|
37 | $this->Lexer->addEntryPattern('<plot(?=.*\x3C/plot\x3E)', $mode, 'plugin_plot'); |
37 | $this->Lexer->addEntryPattern('<plot(?=.*\x3C/plot\x3E)', $mode, 'plugin_plotwas'); |
|
Line 38... | Line 38... | |||
38 | } |
38 | } |
|
39 | |
39 | |
|
40 | function postConnect() { |
40 | function postConnect() { |
|
Line 41... | Line 41... | |||
41 | $this->Lexer->addExitPattern('</plot>', 'plugin_plot'); |
41 | $this->Lexer->addExitPattern('</plot>', 'plugin_plotwas'); |
|
42 | } |
42 | } |
|
43 | |
43 | |