diff options
Diffstat (limited to 'src/server/documentation.odin')
| -rw-r--r-- | src/server/documentation.odin | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/documentation.odin b/src/server/documentation.odin index 4e1cf9f..f5dfcde 100644 --- a/src/server/documentation.odin +++ b/src/server/documentation.odin @@ -118,7 +118,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) @@ -128,7 +128,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) |