diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-07-29 12:00:52 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-07-29 12:00:52 (GMT) |
commit | b8ed98e5b9e84f70bbe485094320201caf1f1ecb (patch) | |
tree | cb85409ada7cc7d8eff7d4ac18108c601e38f993 | |
parent | c0546c1bf81054438e032e43cb675e2e73fad299 (diff) | |
download | Doxygen-b8ed98e5b9e84f70bbe485094320201caf1f1ecb.zip Doxygen-b8ed98e5b9e84f70bbe485094320201caf1f1ecb.tar.gz Doxygen-b8ed98e5b9e84f70bbe485094320201caf1f1ecb.tar.bz2 |
Some code simplifications
-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++) |