summaryrefslogtreecommitdiffstats
path: root/core/namespace/Parsedown.patch
diff options
context:
space:
mode:
Diffstat (limited to 'core/namespace/Parsedown.patch')
-rw-r--r--core/namespace/Parsedown.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/core/namespace/Parsedown.patch b/core/namespace/Parsedown.patch
new file mode 100644
index 0000000..1a81781
--- /dev/null
+++ b/core/namespace/Parsedown.patch
@@ -0,0 +1,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);