+ wxString newsrc(source);
+
+ // pass HTML through registered processors:
+ if (m_Processors || m_GlobalProcessors)
+ {
+ wxHtmlProcessorList::Node *nodeL, *nodeG;
+ int prL, prG;
+
+ nodeL = (m_Processors) ? m_Processors->GetFirst() : NULL;
+ nodeG = (m_GlobalProcessors) ? m_GlobalProcessors->GetFirst() : NULL;
+
+ // VS: there are two lists, global and local, both of them sorted by
+ // priority. Since we have to go through _both_ lists with
+ // decreasing priority, we "merge-sort" the lists on-line by
+ // processing that one of the two heads that has higher priority
+ // in every iteration
+ while (nodeL || nodeG)
+ {
+ prL = (nodeL) ? nodeL->GetData()->GetPriority() : -1;
+ prG = (nodeG) ? nodeG->GetData()->GetPriority() : -1;
+ if (prL > prG)
+ {
+ if (nodeL->GetData()->IsEnabled())
+ newsrc = nodeL->GetData()->Process(newsrc);
+ nodeL = nodeL->GetNext();
+ }
+ else // prL <= prG
+ {
+ if (nodeG->GetData()->IsEnabled())
+ newsrc = nodeG->GetData()->Process(newsrc);
+ nodeG = nodeG->GetNext();
+ }
+ }
+ }