diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index fee7634ac085954237824b0d6b55c34d4f18e302..e8c733b0f77c2bfcf3a83e95587c139c31757cd2 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -857,12 +857,13 @@ void HelpPlugin::highlightSearchTerms() if (name.isEmpty()) continue; - if (m_oldAttrValue == name) { + if (m_oldAttrValue == name + || name.startsWith(m_oldAttrValue + QLatin1Char('-'))) { QWebElement parent = element.parent(); parent.setStyleProperty(property, m_styleProperty); } - if (attrValue == name) { + if (attrValue == name || name.startsWith(attrValue + QLatin1Char('-'))) { QWebElement parent = element.parent(); m_styleProperty = parent.styleProperty(property, QWebElement::InlineStyle); @@ -871,7 +872,6 @@ void HelpPlugin::highlightSearchTerms() } m_oldAttrValue = attrValue; #endif - viewer->findText(m_idFromContext, 0, false, true); } }