@@ -706,8 +706,6 @@ class Highlighter
706
706
className += deleted ? L" wwd-deleted" : L" wwd-changed" ;
707
707
auto & allocator = m_documents[pane].GetAllocator ();
708
708
std::wstring orgtext;
709
- if (diffInfo.nodePos [pane] == 0 )
710
- orgtext = textBlocks[pane].textBlocks ;
711
709
if (diffInfo.nodePos [pane] == 0 )
712
710
{
713
711
if (diffInfo.nodeTypes [pane] == 1 /* ELEMENT_NODE */ )
@@ -719,7 +717,7 @@ class Highlighter
719
717
{
720
718
WValue spanNode, attributes, children;
721
719
attributes.SetArray ();
722
- appendAttributes (attributes, className, i, orgtext , allocator);
720
+ appendAttributes (attributes, className, i, textBlocks[pane]. textBlocks , allocator);
723
721
spanNode.SetObject ();
724
722
spanNode.AddMember (L" nodeName" , L" SPAN" , allocator);
725
723
spanNode.AddMember (L" attributes" , attributes, allocator);
@@ -748,7 +746,7 @@ class Highlighter
748
746
{
749
747
WValue spanNode, attributes, children;
750
748
attributes.SetArray ();
751
- appendAttributes (attributes, className, i, orgtext , allocator);
749
+ appendAttributes (attributes, className, i, L" " , allocator);
752
750
spanNode.SetObject ();
753
751
spanNode.AddMember (L" nodeName" , L" SPAN" , allocator);
754
752
spanNode.AddMember (L" attributes" , attributes, allocator);
@@ -1151,8 +1149,8 @@ class Highlighter
1151
1149
const auto & ary = value[L" attributes" ].GetArray ();
1152
1150
for (unsigned int i = 0 ; i + 1 < ary.Size (); i += 2 )
1153
1151
{
1154
- if (wcscmp (ary[i].GetString (), L" class" ) == 0 ||
1155
- wcsstr (ary[i].GetString (), name) != nullptr )
1152
+ if (wcscmp (ary[i].GetString (), L" class" ) == 0 &&
1153
+ wcsstr (ary[i + 1 ].GetString (), name) != nullptr )
1156
1154
return true ;
1157
1155
}
1158
1156
return false ;
0 commit comments