Fix generated Python code for Doxygen comments ending with quote
Single-line Doxygen comments ending with a double quote resulted in syntactically-invalid Python docstrings in the output, so use triple single quotes as delimiters in this case to avoid it.
This commit is contained in:
parent
3a329566f8
commit
b81cd1bdab
4 changed files with 25 additions and 3 deletions
|
|
@ -91,4 +91,6 @@ void backslashC()
|
|||
void cycle(int id, char *fileName)
|
||||
{}
|
||||
|
||||
/// This doc comment ends with a quote: "and that's ok"
|
||||
void doc_ends_with_quote() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -185,6 +185,8 @@ 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\"");
|
||||
|
||||
// and ask the parser to check comments for us
|
||||
System.exit(CommentParser.check(wantedComments));
|
||||
|
|
|
|||
|
|
@ -131,3 +131,7 @@ 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"'''
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue