mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
lsp: Decompile empty XML docs to empty strings
This commit is contained in:
parent
4e02c34a5b
commit
f526cfa4d9
1 changed files with 13 additions and 10 deletions
|
@ -292,7 +292,10 @@ class LanguageServer:
|
|||
def decompile(self, id, params):
|
||||
text = params.get("text")
|
||||
blp = None
|
||||
|
||||
if text.strip() == "":
|
||||
blp = ""
|
||||
printerr("Decompiled to empty blueprint because input was empty")
|
||||
else:
|
||||
try:
|
||||
blp = decompiler.decompile_string(text)
|
||||
except decompiler.UnsupportedError as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue