mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 02:16:21 +00:00
Remove indentation in symbol body
This commit is contained in:
1 parent
9ee3b0cfc5
commit
b2207d65e8
1 file changed
+4
@@ -947,6 +947,10 @@ class LanguageServer:
|
||||
symbol_file = self.retrieve_full_file_content(symbol["location"]["relativePath"])
|
||||
symbol_lines = symbol_file.split("\n")
|
||||
symbol_body = "\n".join(symbol_lines[symbol_start_line:symbol_end_line])
|
||||
|
||||
# remove leading indentation
|
||||
symbol_start_column = symbol["location"]["range"]["start"]["character"]
|
||||
symbol_body = symbol_body[symbol_start_column:]
|
||||
return symbol_body
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user