summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-12-14 15:43:32 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-12-14 15:43:32 (GMT)
commit1dda553a6c80aae974c0bb90c1870bdbc09004ab (patch)
tree1aa9ca05e9435608eced66b2b5c54b44b9867a03
parent169545c73335cf4a45a2d7a21a40cc2fb17c3aaf (diff)
downloadDoxygen-1dda553a6c80aae974c0bb90c1870bdbc09004ab.zip
Doxygen-1dda553a6c80aae974c0bb90c1870bdbc09004ab.tar.gz
Doxygen-1dda553a6c80aae974c0bb90c1870bdbc09004ab.tar.bz2
issue #7326: Incorrect display of multiline #define value
-rw-r--r--src/pre.l10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pre.l b/src/pre.l
index 2a66146..1ac9cf8 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -2814,7 +2814,15 @@ static void addDefine(yyscan_t yyscanner)
while ((c=*p++) && (c==' ' || c=='\t')) k++;
state->defLitText=state->defLitText.mid(l+1,k-l-1)+state->defLitText.stripWhiteSpace();
}
- md->setInitializer(state->defLitText.stripWhiteSpace());
+ QCString defLitTextStripped = state->defLitText.stripWhiteSpace();
+ if (defLitTextStripped.contains('\n')>=1)
+ {
+ md->setInitializer(state->defLitText);
+ }
+ else
+ {
+ md->setInitializer(defLitTextStripped);
+ }
//printf("pre.l: md->setFileDef(%p)\n",state->inputFileDef);
md->setFileDef(state->inputFileDef);