diff options
author | Thomas Lange <code@nerdmind.de> | 2018-03-29 17:32:49 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2018-03-29 17:32:49 +0200 |
commit | 0a49f259b687aba010dd2edfcdf73d040622b561 (patch) | |
tree | 2b81b653cc892b70e7780ce5fb4481483972ebab /core/namespace/Parsedown.patch | |
parent | 43e1ee4819f87679c0a4efe6b852f22cac50ec98 (diff) | |
download | blog-0a49f259b687aba010dd2edfcdf73d040622b561.tar.gz blog-0a49f259b687aba010dd2edfcdf73d040622b561.tar.xz blog-0a49f259b687aba010dd2edfcdf73d040622b561.zip |
Update Parsedown library to version 1.7.1v2.4.2
This commit updates the Parsedown library to the latest version 1.7.1. The patch to prevent that tab indentations in code blocks are being converted to spaces (see 78c5974cd34559d0130d8be509935e2c992cd9ca) is already applied here. In addition, the patch file itself is now shipped within the same directory where the Parsedown.php resides.
Diffstat (limited to 'core/namespace/Parsedown.patch')
-rw-r--r-- | core/namespace/Parsedown.patch | 40 |
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); |