Skip to content

Commit

Permalink
do not use curly brace string access. fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Jul 4, 2022
1 parent 00efaae commit f48d54f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
* @author Pascal Brachet
*/

if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../../') . '/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
require_once(DOKU_PLUGIN . 'syntax.php');

/**
* All DokuWiki plugins to extend the parser/rendering mechanism
* need to inherit from this class
Expand Down Expand Up @@ -103,8 +99,8 @@ public function handle($match, $state, $pos, Doku_Handler $handler) {
if(!$size) $size = 12;

if(strlen($math) > 1) {
$c_first = $math{0};
$c_last = $math{strlen($math) - 1};
$c_first = $math[0];
$c_last = $math[strlen($math) - 1];
if($c_first == ' ') {
if($c_last == ' ') {
$align = 'center';
Expand Down

0 comments on commit f48d54f

Please sign in to comment.