20Tauri / DoxyDoxygen

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

Alt+Q ruins verbatim environment #128

Closed xtotdam closed 5 years ago

xtotdam commented 5 years ago

I am trying to include some ascii art into my docs so they become more understandable

My doc is looking like that:

/**
\brief      ...
....

\verbatim

  XXXX    XXXX    XXXX                    XXXX                            XXXX
 X////X  X////X  X////X                  X    X                          X////X
X//////XX//////XX//////X   /\      /\   X      X   /\      /\      /\   X//////X
X//////XX//////XX//////X   \/      \/   X      X   \/      \/      \/   X//////X
 X////X  X////X  X////X                  X    X                          X////X
  XXXX    XXXX    XXXX                    XXXX                            XXXX
^                      ^                ^      ^                        ^
|      left_len        |    left_gap    |      |       right_gap        |
+----------------------+----------------+------+------------------------+

\endverbatim

\param      ...
....
\return     ...
*/

After pressing Alt+Q to update tabulations etc (already love this feature) my ascii becomes

\verbatim

XXXX    XXXX    XXXX                    XXXX                            XXXX X////X  X////X  X////X                  X    X                          X////X X//////XX//////XX//////X   /\      /\   X
X   /\      /\      /\   X//////X X//////XX//////XX//////X   \/      \/   X      X   \/      \/      \/   X//////X X////X  X////X  X////X                  X    X                          X////X XXXX
XXXX    XXXX                    XXXX                            XXXX ^                      ^                ^      ^                        ^
| left_len        |    left_gap    |      |       right_gap        | +----------------------+----------------+------+------------------------+

\endverbatim

What am I doing wrong and how can I avoid this?

20Tauri commented 5 years ago

Thank for reporting

Your example is really good. Event with @code @endcode, this case in currenly poorly handled. Next release will at less slightly improve this case (will act like @code). I will also try to fix the second bug take affect the way a comment block is uncomment then recommented

xtotdam commented 5 years ago

I'm not an expert, but maybe the simplest way to handle this situation will be just leave verbatim environment alone?

Edit: Maybe only ensure that there is that combination of symbols that should be in the beginning of every line. (which is defined in "preferred_comments_styles", second item in list)

20Tauri commented 5 years ago

The problem is now fixed in 0.70.1 and comments without inner line introducer are now better handled

xtotdam commented 5 years ago

I've tested it, seems to be fixed:) Thank you