changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / markup / css_singleat.php
1 <?php
2
3 /*
4    This plugin adds the use of @CLASSNAME to create a <div class=CLASSNAME> 
5    surronding the current line. It works faster than the markup_css plugin
6    and its syntax is probably well known to JavaDoc users. (You do not need
7    to have the markup_css loaded to use this one.)
8
9    Andy Fundinger
10 */
11
12
13 $ewiki_plugins["format_line"][] = "ewiki_format_line_css_div";
14
15 function ewiki_format_line_css_div (&$o, &$line, &$post) {
16
17         $atregex = "/^@(\w+) (.*)/";
18         if (preg_match( $atregex, $line, $regs)){
19                 $o .=  "<div class=\"$regs[1]\"> ";
20                 $post = "</div>" . $post;
21                 $line = $regs[2];  //Remove @CLASSNAME from this line
22         }
23 }
24
25 ?>
26