Completed
Push — master ( 3fea26...b1717e )
by Jitendra
13s
created
examples/example.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 use Ahc\HtmlUp;
4 4
 
5
-require dirname(__DIR__) . '/vendor/autoload.php';
5
+require dirname(__DIR__).'/vendor/autoload.php';
6 6
 
7
-$markdown = file_get_contents(dirname(__DIR__) . '/readme.md');
7
+$markdown = file_get_contents(dirname(__DIR__).'/readme.md');
8 8
 
9 9
 /* You can use any of the three usage methods below */
10 10
 
Please login to merge, or discard this patch.
src/HtmlUp.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     protected function anchors()
173 173
     {
174 174
         // Images.
175
-        $this->markup = preg_replace_callback(static::RE_MD_IMG, function ($img) {
175
+        $this->markup = preg_replace_callback(static::RE_MD_IMG, function($img) {
176 176
             $title = isset($img[3]) ? " title={$img[3]} " : '';
177 177
             $alt   = $img[1] ? " alt=\"{$img[1]}\" " : '';
178 178
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         }, $this->markup);
181 181
 
182 182
         // Anchors.
183
-        $this->markup = preg_replace_callback(static::RE_MD_URL, function ($a) {
183
+        $this->markup = preg_replace_callback(static::RE_MD_URL, function($a) {
184 184
             $title = isset($a[3]) ? " title={$a[3]} " : '';
185 185
 
186 186
             return "<a href=\"{$a[2]}\"{$title}>{$a[1]}</a>";
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     protected function spans()
191 191
     {
192 192
         // em/code/strong/del
193
-        $this->markup = preg_replace_callback(static::RE_MD_FONT, function ($em) {
193
+        $this->markup = preg_replace_callback(static::RE_MD_FONT, function($em) {
194 194
             switch (substr($em[1], 0, 2)) {
195 195
                 case  '**':
196 196
                 case '__':
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             $level = strlen($this->trimmedLine) - strlen(ltrim($this->trimmedLine, '#'));
292 292
 
293 293
             if ($level < 7) {
294
-                $this->markup .= "\n<h{$level}>" . ltrim(ltrim($this->trimmedLine, '# ')) . "</h{$level}>";
294
+                $this->markup .= "\n<h{$level}>".ltrim(ltrim($this->trimmedLine, '# '))."</h{$level}>";
295 295
 
296 296
                 return true;
297 297
             }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
         if ($codeBlock || (empty($this->inList) && empty($this->inQuote) && $this->indent >= 4)) {
319 319
             $lang = isset($codeMatch[1])
320
-                ? ' class="language-' . $codeMatch[1] . '"'
320
+                ? ' class="language-'.$codeMatch[1].'"'
321 321
                 : '';
322 322
 
323 323
             $this->markup .= "\n<pre><code{$lang}>";
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                 ++$this->listLevel;
379 379
             }
380 380
 
381
-            $this->markup .= '<li>' . ltrim($this->trimmedLine, '-*0123456789. ');
381
+            $this->markup .= '<li>'.ltrim($this->trimmedLine, '-*0123456789. ');
382 382
 
383 383
             $this->listInternal();
384 384
 
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
             $this->trimmedLine = trim($this->trimmedLine, '|');
465 465
 
466 466
             foreach (explode('|', $this->trimmedLine) as $hdr) {
467
-                $this->markup .= '<th>' . trim($hdr) . "</th>\n";
467
+                $this->markup .= '<th>'.trim($hdr)."</th>\n";
468 468
             }
469 469
 
470 470
             $this->markup .= "</tr>\n</thead>\n<tbody>\n";
Please login to merge, or discard this patch.