Completed
Push — master ( f3a861...b23fd4 )
by Mark
02:18
created
syntax.php 1 patch
Braces   +17 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,8 +21,12 @@  discard block
 block discarded – undo
21 21
  * @author     Ben Slusky <[email protected]>
22 22
  *
23 23
  */
24
-if (!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../../') . '/');
25
-if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
24
+if (!defined('DOKU_INC')) {
25
+    define('DOKU_INC', realpath(dirname(__FILE__) . '/../../') . '/');
26
+}
27
+if (!defined('DOKU_PLUGIN')) {
28
+    define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
29
+}
26 30
 require_once(DOKU_PLUGIN . 'syntax.php');
27 31
 class syntax_plugin_yalist extends DokuWiki_Syntax_Plugin {
28 32
     var $stack = array();
@@ -62,8 +66,9 @@  discard block
 block discarded – undo
62 66
                         "${frame['list']}_open",
63 67
                         "${frame['item']}_open",
64 68
                         "${frame['item']}_content_open");
65
-            if ($frame['paras'])
66
-                array_push($output, 'p_open');
69
+            if ($frame['paras']) {
70
+                            array_push($output, 'p_open');
71
+            }
67 72
             array_push($this->stack, $frame);
68 73
             break;
69 74
         case DOKU_LEXER_EXIT:
@@ -106,13 +111,14 @@  discard block
 block discarded – undo
106 111
                     $last_frame = end($this->stack);
107 112
                 }
108 113
                 if ($last_frame['paras']) {
109
-                    if ($close_content)
110
-                        // depth did not change
114
+                    if ($close_content) {
115
+                                            // depth did not change
111 116
                         array_push($output, 'p_close', 'p_open');
112
-                    else
113
-                        array_push($output,
117
+                    } else {
118
+                                            array_push($output,
114 119
                                     "${last_frame['item']}_content_open",
115 120
                                     'p_open');
121
+                    }
116 122
                 } else {
117 123
                     // let's just pretend we didn't match...
118 124
                     $state = DOKU_LEXER_UNMATCHED;
@@ -177,8 +183,9 @@  discard block
 block discarded – undo
177 183
             array_push($output,
178 184
                         "${curr_frame['item']}_open",
179 185
                         "${curr_frame['item']}_content_open");
180
-            if ($curr_frame['paras'])
181
-                array_push($output, 'p_open');
186
+            if ($curr_frame['paras']) {
187
+                            array_push($output, 'p_open');
188
+            }
182 189
             $curr_frame['level'] = $level;
183 190
             array_push($this->stack, $curr_frame);
184 191
             break;
Please login to merge, or discard this patch.