fix(controller/paste): prioritize encoding over highlighting
This commit is contained in:
parent
5288c64cbb
commit
e4de8e285e
1 changed files with 4 additions and 2 deletions
|
|
@ -100,11 +100,13 @@ def get(**kwargs):
|
|||
else:
|
||||
paste_model.remove(pid, backend.paste)
|
||||
|
||||
if encoding is not None:
|
||||
data = data.decode(encoding)
|
||||
|
||||
if syntax is not None:
|
||||
data = highlight(data, str(syntax), formatter, linenos)
|
||||
|
||||
if encoding is not None:
|
||||
data = data.decode(encoding)
|
||||
|
||||
|
||||
return ConnexionResponse(
|
||||
status_code=200,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue