Merge branch 'python-doxygen-quotes'

* python-doxygen-quotes:
  Fix generated Python code for Doxygen comments with triple quotes
  Fix generated Python code for Doxygen comments ending with quote
This commit is contained in:
William S Fulton 2020-06-07 10:23:33 +01:00
commit 991c2afe11
4 changed files with 51 additions and 3 deletions

View file

@ -91,4 +91,12 @@ void backslashC()
void cycle(int id, char *fileName)
{}
/// This doc comment ends with a quote: "and that's ok"
void doc_ends_with_quote() {}
/**
This comment contains embedded triple-quoted string:
"""How quaint"""
*/
void doc_with_triple_quotes() {}

View file

@ -185,6 +185,12 @@ public class doxygen_misc_constructs_runme {
"\n" +
" @param fileName name of the log file\n");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.doc_ends_with_quote()",
"This doc comment ends with a quote: \"and that's ok\"");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.doc_with_triple_quotes()",
"This comment contains embedded triple-quoted string:\n" +
"\"\"\"How quaint\"\"\"");
// and ask the parser to check comments for us
System.exit(CommentParser.check(wantedComments));

View file

@ -131,3 +131,13 @@ Spaces at the start of line should be taken into account:
:type fileName: string
:param fileName: name of the log file"""
);
comment_verifier.check(inspect.getdoc(doxygen_misc_constructs.doc_ends_with_quote),
r'''This doc comment ends with a quote: "and that's ok"'''
);
comment_verifier.check(inspect.getdoc(doxygen_misc_constructs.doc_with_triple_quotes),
r'''This comment contains embedded triple-quoted string:
"""How quaint"""'''
);