Skip to content

Commit e47f64a

Browse files
committed
Added setSpecialCaseTags function
1 parent bc7338a commit e47f64a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/Caxy/HtmlDiff/HtmlDiff.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,20 @@ public function __construct($oldText, $newText, $encoding = 'UTF-8', $specialCas
2222
$this->encoding = $encoding;
2323
$this->content = '';
2424

25-
if (!empty($specialCaseTags)) {
26-
$this->specialCaseTags = $specialCaseTags;
25+
$this->setSpecialCaseTags($specialCaseTags);
26+
}
27+
28+
public function setSpecialCaseTags(array $tags = array())
29+
{
30+
if (!empty($tags)) {
31+
$this->specialCaseTags = $tags;
2732
}
2833

2934
foreach ($this->specialCaseTags as $tag) {
3035
$this->addSpecialCaseTag($tag);
3136
}
32-
3337
}
38+
3439
public function addSpecialCaseTag($tag)
3540
{
3641
if (!in_array($tag, $this->specialCaseTags)) {

0 commit comments

Comments
 (0)