20Tauri / DoxyDoxygen

The last word in code documentation generation
140 stars 5 forks source link

I want to intentionally insert a new line (\n). #162

Closed siva-shiba closed 2 years ago

siva-shiba commented 2 years ago

Hi. I want to intentionally add a blank line when auto-generating a comment block.

However, preferred_comments_styles does not work if the end of the string is \n Is this a bug?

Currently, if I set it up like this

"preferred_comments_styles":[
    [
        ["#", "=", "\n"],
        "#",
        ["\n#", "="]
    ]
]

It will look like this

#=====================================================
# @fn (function declaration)
# @brief { function_description }
# @param a { parameter_description }
# @param b { parameter_description }
# @return { description_of_the_return_value }

#=====================================================

Is there any good solution or setting?

Expected is this:

#=====================================================

# @fn (function declaration)
# @brief { function_description }
# @param a { parameter_description }
# @param b { parameter_description }
# @return { description_of_the_return_value }

#=====================================================
20Tauri commented 2 years ago

Hello,

Not a bug, \n in preferred_comments_styles has an undefined behavior (even if it solve one of your case)

block_layout can help to create an "empty" line. But the "empty" line will start with a "#". There is no way to generate your exact comment. If you remove the comment introducer from a single comment line, you will have 2 comments blocks (for most/all syntaxes), this may cause unwanted behaviors.