summaryrefslogtreecommitdiffstats
path: root/core/namespace/Parsedown.patch
blob: 1a817815aed78d690d7a35e7f244da496933b6c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
160,176d159
<             if (strpos($line, "\t") !== false)
<             {
<                 $parts = explode("\t", $line);
< 
<                 $line = $parts[0];
< 
<                 unset($parts[0]);
< 
<                 foreach ($parts as $part)
<                 {
<                     $shortage = 4 - mb_strlen($line, 'utf-8') % 4;
< 
<                     $line .= str_repeat(' ', $shortage);
<                     $line .= $part;
<                 }
<             }
< 
327c310,313
<         if ($Line['indent'] >= 4)
---
>         $conditionA = $Line['indent'] >= 4;
>         $conditionB = substr($Line['body'], 0, 1) === "\t";
> 
>         if (($conditionA and $remove = 4) or ($conditionB and $remove = 1))
329c315
<             $text = substr($Line['body'], 4);
---
>             $text = substr($Line['body'], $remove);
348c334,337
<         if ($Line['indent'] >= 4)
---
>         $conditionA = $Line['indent'] >= 4;
>         $conditionB = substr($Line['body'], 0, 1) === "\t";
> 
>         if (($conditionA and $remove = 4) or ($conditionB and $remove = 1))
359c348
<             $text = substr($Line['body'], 4);
---
>             $text = substr($Line['body'], $remove);