Completed
Push — 2.0.0 ( 6a6555...ed66fb )
by John
04:22
created
Alpha/Util/Extension/Markdown.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         if (isset($codeTypeTag[0])) {
75 75
             $start = mb_strpos($codeTypeTag[0], '[');
76 76
             $end = mb_strpos($codeTypeTag[0], ']');
77
-            $language = mb_substr($codeTypeTag[0], $start + 1, $end - ($start + 1));
77
+            $language = mb_substr($codeTypeTag[0], $start+1, $end-($start+1));
78 78
         } else {
79 79
             // will use php as a defualt language type when none is provided
80 80
             $language = 'php';
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
     {
101 101
         $config = ConfigProvider::getInstance();
102 102
 
103
-        $whole_match    =  $matches[1];
104
-        $link_text      =  $this->runSpanGamut($matches[2]);
105
-        $url            =  $matches[3] == '' ? $matches[4] : $matches[3];
106
-        $title          =& $matches[7];
107
-        $attr  = $this->doExtraAttributes("a", $dummy =& $matches[8]);
103
+        $whole_match    = $matches[1];
104
+        $link_text      = $this->runSpanGamut($matches[2]);
105
+        $url            = $matches[3] == '' ? $matches[4] : $matches[3];
106
+        $title          = & $matches[7];
107
+        $attr = $this->doExtraAttributes("a", $dummy = & $matches[8]);
108 108
 
109 109
         $external = false;
110 110
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $result = "<a href=\"$url\"";
127 127
         if (isset($title)) {
128 128
             $title = $this->encodeAttribute($title);
129
-            $result .=  " title=\"$title\"";
129
+            $result .= " title=\"$title\"";
130 130
         }
131 131
         if ($external) {
132 132
             $result .= " target=\"$url\"";
@@ -205,6 +205,6 @@  discard block
 block discarded – undo
205 205
         $text .= "</tbody>\n";
206 206
         $text .= "</table>";
207 207
         
208
-        return $this->hashBlock($text) . "\n";
208
+        return $this->hashBlock($text)."\n";
209 209
     }
210 210
 }
Please login to merge, or discard this patch.
Braces   +15 added lines, -12 removed lines patch added patch discarded remove patch
@@ -158,14 +158,15 @@  discard block
 block discarded – undo
158 158
         # Reading alignement from header underline.
159 159
         $separators = preg_split('/ *[|] */', $underline);
160 160
         foreach ($separators as $n => $s) {
161
-            if (preg_match('/^ *-+: *$/', $s))
162
-                $attr[$n] = $this->_doTable_makeAlignAttr('right');
163
-            else if (preg_match('/^ *:-+: *$/', $s))
164
-                $attr[$n] = $this->_doTable_makeAlignAttr('center');
165
-            else if (preg_match('/^ *:-+ *$/', $s))
166
-                $attr[$n] = $this->_doTable_makeAlignAttr('left');
167
-            else
168
-                $attr[$n] = '';
161
+            if (preg_match('/^ *-+: *$/', $s)) {
162
+                            $attr[$n] = $this->_doTable_makeAlignAttr('right');
163
+            } else if (preg_match('/^ *:-+: *$/', $s)) {
164
+                            $attr[$n] = $this->_doTable_makeAlignAttr('center');
165
+            } else if (preg_match('/^ *:-+ *$/', $s)) {
166
+                            $attr[$n] = $this->_doTable_makeAlignAttr('left');
167
+            } else {
168
+                            $attr[$n] = '';
169
+            }
169 170
         }
170 171
         
171 172
         # Parsing span elements, including code spans, character escapes, 
@@ -179,8 +180,9 @@  discard block
 block discarded – undo
179 180
         $text = "<table class=\"table table-bordered\">\n";
180 181
         $text .= "<thead>\n";
181 182
         $text .= "<tr>\n";
182
-        foreach ($headers as $n => $header)
183
-            $text .= "  <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n";
183
+        foreach ($headers as $n => $header) {
184
+                    $text .= "  <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n";
185
+        }
184 186
         $text .= "</tr>\n";
185 187
         $text .= "</thead>\n";
186 188
         
@@ -198,8 +200,9 @@  discard block
 block discarded – undo
198 200
             $row_cells = array_pad($row_cells, $col_count, '');
199 201
             
200 202
             $text .= "<tr>\n";
201
-            foreach ($row_cells as $n => $cell)
202
-                $text .= "  <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n";
203
+            foreach ($row_cells as $n => $cell) {
204
+                            $text .= "  <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n";
205
+            }
203 206
             $text .= "</tr>\n";
204 207
         }
205 208
         $text .= "</tbody>\n";
Please login to merge, or discard this patch.