From 5870db1f2848ff551007a0feff0b25e1029f7eb6 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 27 May 2020 17:47:44 +0200 Subject: Warning in case of multiple python documentation sections. In special cases when having multiple documentation section for 1 item in python it is possible that they are concatenated in a wrong way and result in a warning. Each documentation section should be seen as a separate section and be separated from other sections. the example: ``` ##################################################################### # # Modify Install Stage ############################################ ##################################################################### class install(_install): """Specialised python package installer. It does some required chown calls in addition to the usual stuff. """ ``` gives a warning like: ``` warning: unexpected command endverbatim ``` --- src/pyscanner.l | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pyscanner.l b/src/pyscanner.l index f2a315c..ed76c75 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -1618,6 +1618,10 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief // TODO: Fix me yyextra->docBlockInBody=FALSE; + if (!yyextra->current->doc.isEmpty()) + { + yyextra->current->doc=yyextra->current->doc.stripWhiteSpace()+"\n\n"; + } if (yyextra->docBlockInBody && yyextra->previous && !yyextra->previous->doc.isEmpty()) { yyextra->previous->doc=yyextra->previous->doc.stripWhiteSpace()+"\n\n"; -- cgit v0.12