diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-12-09 19:58:40 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-12-09 19:58:40 (GMT) |
commit | 237014486642e511103f3f5111bd3164d2bd6c26 (patch) | |
tree | 604271a17f920fd55a0ca3f6b779cdf78e13a53b /src | |
parent | 772046d4e43fea32cf6dedf13f4b0497a4125528 (diff) | |
parent | 79b40a437092bccb6589cdb29c0059a4797b771d (diff) | |
download | Doxygen-237014486642e511103f3f5111bd3164d2bd6c26.zip Doxygen-237014486642e511103f3f5111bd3164d2bd6c26.tar.gz Doxygen-237014486642e511103f3f5111bd3164d2bd6c26.tar.bz2 |
Merge pull request #256 from albert-github/feature/bug_first_line_inline
Extra empty line in source fragments
Diffstat (limited to 'src')
-rw-r--r-- | src/definition.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/definition.cpp b/src/definition.cpp index 4e90818..2f66c4f 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -755,6 +755,7 @@ bool readCodeFragment(const char *fileName, { while ((c=fgetc(f))!='\n' && c!=EOF) /* skip */; lineNr++; + if (found && c == '\n') c = '\0'; } if (!feof(f)) { @@ -763,7 +764,7 @@ bool readCodeFragment(const char *fileName, while (lineNr<=endLine && !feof(f) && !found) { int pc=0; - while ((c=fgetc(f))!='{' && c!=':' && c!=EOF) + while ((c=fgetc(f))!='{' && c!=':' && c!=EOF) // } so vi matching brackets has no problem { //printf("parsing char `%c'\n",c); if (c=='\n') @@ -816,7 +817,7 @@ bool readCodeFragment(const char *fileName, result+=spaces; } // copy until end of line - result+=c; + if (c) result+=c; startLine=lineNr; if (c==':') { |