Conditions | 2 |
Paths | 2 |
Total Lines | 36 |
Code Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function connectTo($mode) |
||
10 | { |
||
11 | global $conf; |
||
12 | |||
13 | $ws = '\s/\#~:+=&%@\-\x28\x29\]\[{}><"\''; // whitespace |
||
14 | $punc = ';,\.?!'; |
||
15 | |||
16 | if ($conf['typography'] == 2) { |
||
17 | $this->Lexer->addSpecialPattern( |
||
18 | "(?<=^|[$ws])'(?=[^$ws$punc])", |
||
19 | $mode, |
||
20 | 'singlequoteopening' |
||
21 | ); |
||
22 | $this->Lexer->addSpecialPattern( |
||
23 | "(?<=^|[^$ws]|[$punc])'(?=$|[$ws$punc])", |
||
24 | $mode, |
||
25 | 'singlequoteclosing' |
||
26 | ); |
||
27 | $this->Lexer->addSpecialPattern( |
||
28 | "(?<=^|[^$ws$punc])'(?=$|[^$ws$punc])", |
||
29 | $mode, |
||
30 | 'apostrophe' |
||
31 | ); |
||
32 | } |
||
33 | |||
34 | $this->Lexer->addSpecialPattern( |
||
35 | "(?<=^|[$ws])\"(?=[^$ws$punc])", |
||
36 | $mode, |
||
37 | 'doublequoteopening' |
||
38 | ); |
||
39 | $this->Lexer->addSpecialPattern( |
||
40 | "\"", |
||
41 | $mode, |
||
42 | 'doublequoteclosing' |
||
43 | ); |
||
44 | } |
||
45 | |||
52 |