aboutsummaryrefslogtreecommitdiff
path: root/src/server/documentation.odin
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-31 20:27:15 -0400
committerGitHub <noreply@github.com>2025-07-31 20:27:15 -0400
commit5d1bf18bb5e0494759fce01490fe02b802c26561 (patch)
tree12cb74a9e1d293b05190a19c7d3bcf7f9011aa75 /src/server/documentation.odin
parent429b6946fffcef8f6d9d03ac98a438450cff5caa (diff)
parent20c207ce22a4233a5bcf79b1328bed4d7ba06153 (diff)
Merge pull request #816 from BradLewis/fix/signature-documentation
Remove markdown and duplicate comments from signature documentation
Diffstat (limited to 'src/server/documentation.odin')
-rw-r--r--src/server/documentation.odin8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/documentation.odin b/src/server/documentation.odin
index aab3cff..ab5b827 100644
--- a/src/server/documentation.odin
+++ b/src/server/documentation.odin
@@ -120,7 +120,7 @@ build_documentation :: proc(ast_context: ^AstContext, symbol: ^Symbol, short_sig
}
}
-construct_symbol_docs :: proc(symbol: Symbol, allocator := context.temp_allocator) -> string {
+construct_symbol_docs :: proc(symbol: Symbol, markdown := true, allocator := context.temp_allocator) -> string {
sb := strings.builder_make(allocator = allocator)
if symbol.doc != "" {
strings.write_string(&sb, symbol.doc)
@@ -130,7 +130,11 @@ construct_symbol_docs :: proc(symbol: Symbol, allocator := context.temp_allocato
}
if symbol.comment != "" {
- fmt.sbprintf(&sb, "\n```odin\n%s\n```", symbol.comment)
+ if markdown {
+ fmt.sbprintf(&sb, "\n```odin\n%s\n```", symbol.comment)
+ } else {
+ fmt.sbprintf(&sb, "\n%s", symbol.comment)
+ }
}
return strings.to_string(sb)