Skip to content
Snippets Groups Projects
Commit 6ea7a385 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

browse/content: Fix display of languages dropdown for some contents

Ensure languages selection dropdown is displayed for content whose
mime type starts with application/ if the content encoding is not
binary, for instance application/json.
parent 80e7b409
No related branches found
No related tags found
No related merge requests found
......@@ -342,7 +342,13 @@ def content_display(
available_languages = None
if mimetype and "text/" in mimetype:
if mimetype and (
mimetype.startswith("text/")
or (
mimetype.startswith("application/")
and content_data.get("encoding", "") != "binary"
)
):
available_languages = highlightjs.get_supported_languages()
filename = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment