*/
protected $insertSpaceInReplace = false;
+ /**
+ * Whether to keep newlines in the diff
+ * @var bool
+ */
+ protected $keepNewLines = false;
+
/**
* @var string
*/
'i' => '[[REPLACE_EM]]',
'a' => '[[REPLACE_A]]',
'img' => '[[REPLACE_IMG]]',
+ 'pre' => '[[REPLACE_PRE]]',
);
/**
return $this;
}
+ /**
+ * @return bool
+ */
+ public function isKeepNewLines()
+ {
+ return $this->keepNewLines;
+ }
+
+ /**
+ * @param bool $keepNewLines
+ */
+ public function setKeepNewLines($keepNewLines)
+ {
+ $this->keepNewLines = $keepNewLines;
+ }
+
/**
* @return array
*/
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) {