X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fcaxy%2Fphp-htmldiff%2Flib%2FCaxy%2FHtmlDiff%2FHtmlDiffConfig.php;fp=vendor%2Fcaxy%2Fphp-htmldiff%2Flib%2FCaxy%2FHtmlDiff%2FHtmlDiffConfig.php;h=2bfdcaa0b6b4bcd264461a6ab9731a41ab3ea99a;hp=0d0cbd1b98c2b912a3dc95815420855f76860b62;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiffConfig.php b/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiffConfig.php index 0d0cbd1b9..2bfdcaa0b 100644 --- a/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiffConfig.php +++ b/vendor/caxy/php-htmldiff/lib/Caxy/HtmlDiff/HtmlDiffConfig.php @@ -27,6 +27,12 @@ class HtmlDiffConfig */ protected $insertSpaceInReplace = false; + /** + * Whether to keep newlines in the diff + * @var bool + */ + protected $keepNewLines = false; + /** * @var string */ @@ -48,6 +54,7 @@ class HtmlDiffConfig 'i' => '[[REPLACE_EM]]', 'a' => '[[REPLACE_A]]', 'img' => '[[REPLACE_IMG]]', + 'pre' => '[[REPLACE_PRE]]', ); /** @@ -293,6 +300,22 @@ class HtmlDiffConfig return $this; } + /** + * @return bool + */ + public function isKeepNewLines() + { + return $this->keepNewLines; + } + + /** + * @param bool $keepNewLines + */ + public function setKeepNewLines($keepNewLines) + { + $this->keepNewLines = $keepNewLines; + } + /** * @return array */ @@ -322,7 +345,7 @@ class HtmlDiffConfig public function addIsolatedDiffTag($tag, $placeholder = null) { if (null === $placeholder) { - $placeholder = sprintf('[[REPLACE_%s]]', strtoupper($tag)); + $placeholder = sprintf('[[REPLACE_%s]]', mb_strtoupper($tag)); } if ($this->isIsolatedDiffTag($tag) && $this->isolatedDiffTags[$tag] !== $placeholder) {