Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7796887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:30:34+00:00 2026-06-01T23:30:34+00:00

My doxygen documentation shows the source-code of each class member function. My source code

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:30:36+00:00Added an answer on June 1, 2026 at 11:30 pm

    The only way I can think of doing this is to define some preprocessor to strip the multiple blank lines before doxygen uses the source code in the documentation. To define an action (or filter) to perform on the source files use the INPUT_FILTER configuration file option.

    Warning: The following has not been tested.

    From the question How can I replace multiple empty lines with a single empty line in bash? it seems that one can use

    sed /^$/d
    

    to strip multiple blank lines, so in your configuration file, set

    INPUT_FILTER = sed /^$/d
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Doxygen to generate documentation for my code. I need to make a
Is it possible to group function parameters in Doxygen documentation so that I don't
I use code-generation for my data access layer and Doxygen for documentation. My problem
I am using doxygen to generate a PDF of my code documentation. The PDF
I've started using Doxygen to document my team's project source code (we have C#,
When you place the mouse pointer over any Qt function/class it shows a pop-up
I am generating doxygen documentation for my (fairly small) project on each build. I
I like Doxygen to create documentation of C or PHP code. I have an
Using Doxygen 1.7.4 Sometimes I'll have a block of public member functions that belong
I'm documenting code C with doxygen but this function can´t /** * @fn void

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.