Fix generated Python code for Doxygen comments with triple quotes

In addition to the changes in the previous commit, also avoid syntax
errors in the generated Python docstrings by splitting them into several
parts if there are 3 quotes in a row in the input, as it's impossible to
have them inside triple-quoted strings, generally speaking (i.e. if
there are occurrences of both """ and ''' inside the string).
This commit is contained in:
Vadim Zeitlin 2020-03-03 15:48:42 +01:00
commit f57b096c92
4 changed files with 26 additions and 0 deletions

View file

@ -188,6 +188,10 @@ public class doxygen_misc_constructs_runme {
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));
}