mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 16:12:51 +11:00
Include a trailing newline in API responses
This fixes an annoyance where using, e.g., git diff | curl -F 'content=<-' https://dpaste.de/api/ would place the bash prompt on the same line as the response.
This commit is contained in:
parent
c83c908afb
commit
815bc322b0
1 changed files with 2 additions and 2 deletions
|
@ -256,8 +256,8 @@ def snippet_api(request, enclose_quotes=True):
|
|||
|
||||
response = 'https://dpaste.de%s' % s.get_absolute_url()
|
||||
if enclose_quotes:
|
||||
return HttpResponse('"%s"' % response)
|
||||
return HttpResponse(response)
|
||||
return HttpResponse('"%s"\n' % response)
|
||||
return HttpResponse(response + '\n')
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue