diff --git a/kclvm/sema/src/resolver/doc.rs b/kclvm/sema/src/resolver/doc.rs index 6bd3a3346..16074431e 100644 --- a/kclvm/sema/src/resolver/doc.rs +++ b/kclvm/sema/src/resolver/doc.rs @@ -341,7 +341,7 @@ impl Doc { }) .collect::>() .join("\n"); - format!("{summary}\n\nAttributes\n---------\n{attrs_string}\n\nExamples\n--------{examples_string}\n") + format!("{summary}\n\nAttributes\n----------\n{attrs_string}\n\nExamples\n--------{examples_string}\n") } } diff --git a/kclvm/tools/src/LSP/src/completion.rs b/kclvm/tools/src/LSP/src/completion.rs index d52fb5f23..0a179c8ce 100644 --- a/kclvm/tools/src/LSP/src/completion.rs +++ b/kclvm/tools/src/LSP/src/completion.rs @@ -1137,7 +1137,7 @@ mod tests { assert_eq!( arr[0], CompletionItem { - label: "\n\nAttributes\n---------\nname: \nworkloadType: \nreplica: \n\nExamples\n--------\n".to_string(), + label: "\n\nAttributes\n----------\nname: \nworkloadType: \nreplica: \n\nExamples\n--------\n".to_string(), detail: Some("generate docstring".to_string()), kind: Some(CompletionItemKind::SNIPPET), documentation: Some(lsp_types::Documentation::String("docstring for Server".to_string())),