Single line C# documentation indentation formatting fix

Indent single line comments to same level as function definition below
the comment.

Also correct String * -> char * type in Python and C# apis
This commit is contained in:
William S Fulton 2024-07-29 23:49:36 +01:00
parent 37013523af
commit e0b83d61b9
2 changed files with 7 additions and 7 deletions

View File

@ -4762,7 +4762,7 @@ public:
* Get documentation comments, if any
*--------------------------------------------------------------------*/
String *docstring(Node *n, const String *indent, bool low_level = false) {
String *docstring(Node *n, const char *indent, bool low_level = false) {
String *docstr = build_combined_docstring(n, indent, low_level);
const int len = Len(docstr);
if (!len)
@ -4778,7 +4778,7 @@ public:
* may be empty if there is no docstring).
*--------------------------------------------------------------------*/
String *build_combined_docstring(Node *n, const String *indent = "", bool low_level = false) {
String *build_combined_docstring(Node *n, const char *indent = "", bool low_level = false) {
String *docstr = NULL;
if (doxygen && doxygenTranslator->hasDocumentation(n)) {
@ -4800,7 +4800,7 @@ public:
Delete(docstr);
docstr = tmp;
} else {
String *tmp = NewString("");
String *tmp = NewString(indent);
Append(tmp, "/// ");
Append(tmp, docstr);
Append(tmp, "\n");
@ -4819,7 +4819,7 @@ public:
* the indentation string in 'indent'.
* ------------------------------------------------------------ */
String *indent_docstring(const String *code, const_String_or_char_ptr indent) {
String *indent_docstring(const String *code, const char *indent) {
String *out = NewString("");
String *temp;
char *t;

View File

@ -1382,7 +1382,7 @@ public:
* the indentation string in 'indent'.
* ------------------------------------------------------------ */
String *indent_docstring(const String *code, const_String_or_char_ptr indent) {
String *indent_docstring(const String *code, const char *indent) {
String *out = NewString("");
String *temp;
char *t;
@ -1501,7 +1501,7 @@ public:
* may be empty if there is no docstring).
* ------------------------------------------------------------ */
String *build_combined_docstring(Node *n, autodoc_t ad_type, const String *indent = "", bool low_level = false) {
String *build_combined_docstring(Node *n, autodoc_t ad_type, const char *indent = "", bool low_level = false) {
bool add_autodoc = true;
String *docstr = Getattr(n, "feature:docstring");
if (docstr) {
@ -1590,7 +1590,7 @@ public:
* set then it will build a combined docstring.
* ------------------------------------------------------------ */
String *docstring(Node *n, autodoc_t ad_type, const String *indent, bool low_level = false) {
String *docstring(Node *n, autodoc_t ad_type, const char *indent, bool low_level = false) {
String *docstr = build_combined_docstring(n, ad_type, indent, low_level);
const int len = Len(docstr);
if (!len)