diff options
| author | gingerBill <bill@gingerbill.org> | 2022-01-17 14:43:42 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-01-17 14:43:42 +0000 |
| commit | 686dbb4421824f17164443b2538b587e91d400a5 (patch) | |
| tree | 8bb4039c6aa14cc68f5800320dc63ea7e9a45f1e /src/docs_writer.cpp | |
| parent | cd6898439e9de6fce42555e2bab5c27e206dbcde (diff) | |
Correct odin doc comment printing
Diffstat (limited to 'src/docs_writer.cpp')
| -rw-r--r-- | src/docs_writer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp index 56ad0561e..94b43be99 100644 --- a/src/docs_writer.cpp +++ b/src/docs_writer.cpp @@ -292,8 +292,9 @@ bool odin_doc_append_comment_group_string(Array<u8> *buf, CommentGroup *g) { String comment = g->list[i].string; String original_comment = comment; - bool slash_slash = comment[1] == '/'; + bool slash_slash = false; if (comment[1] == '/') { + slash_slash = true; comment.text += 2; comment.len -= 2; } else if (comment[1] == '*') { @@ -330,7 +331,7 @@ bool odin_doc_append_comment_group_string(Array<u8> *buf, CommentGroup *g) { } } String line = substring(comment, pos, end); - pos = end+1; + pos = end; String trimmed_line = string_trim_whitespace(line); if (trimmed_line.len == 0) { if (count == 0) { |