diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/util.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp index 9cf7b82..013b0e4 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2032,18 +2032,17 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope, int floatingIndex=0; if (strLen==0) return; // read a word from the text string - newIndex=regExp.match(txtStr,index,&matchLen); while ((newIndex=regExp.match(txtStr,index,&matchLen))!=-1) { - if (!(newIndex == 0 || !(txtStr.at(newIndex-1)>='0' && txtStr.at(newIndex-1)<='9'))) // avoid matching part of hex numbers + floatingIndex+=newIndex-skipIndex+matchLen; + if (newIndex>0 && txtStr.at(newIndex-1)=='0') // ignore hex numbers (match x00 in 0x00) { out.writeString(txtStr.mid(skipIndex,newIndex+matchLen-skipIndex),keepSpaces); - floatingIndex+=newIndex-skipIndex+matchLen; skipIndex=index=newIndex+matchLen; continue; } + // add non-word part to the result - floatingIndex+=newIndex-skipIndex+matchLen; bool insideString=FALSE; int i; for (i=index;i<newIndex;i++) |