Commit 2a846868 authored by Flavio TARSETTI's avatar Flavio TARSETTI

Merge branch 'improve_language_auto_discovery' into 'master'

Improve language auto discovery

Closes beat.editor#232

See merge request !53
parents d92a4f6a da7741bd
Pipeline #31522 passed with stages
in 12 minutes and 42 seconds
......@@ -312,7 +312,7 @@ class CodeStorage(AbstractStorage):
text = json or self.json.load()
json = simplejson.loads(text)
return json["language"]
except IOError:
except (IOError, KeyError, simplejson.JSONDecodeError):
return "unknown"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment