My doxygen documentation shows the source-code of each class member function. My source code sometimes contains multiple blank lines between functions.
How can I get doxygen to compact or strip these multiple blank lines? (instead of showing them in the preview)
ANSWER (from below)
The answer below pointed me in the right direction: INPUT_FILTER (doxygen documentation)
The INPUT_FILTER tag can be used to specify a program that doxygen should invoke to filter for each input file. Doxygen will invoke the filter program by executing (via popen()) the command:
<filter> <input-file>
where is the value of the INPUT_FILTER tag, and is the name of an input file. Doxygen will then use the output that the filter program writes to standard output.
I quickly wrote a python script (I'm on Win7) that does the 'compacting':
import re
import sys
if len(sys.argv) != 2:
exit()
with open(sys.argv[1]) as f:
original = f.read()
compact = re.sub('\n\n\n+', '\n\n', original)
print(compact)
Then I added it to the filter:
INPUT_FILTER = "python ../DoxyCompact.py"
This also opens up A LOT of possibilities to modify the source before doxygen reads it!