From 883f465abe9df65a5186b358d0404f059b1f7a0d Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 6 Jun 2013 16:10:24 +0300 Subject: [PATCH] Fix snippet raw content being escaped --- lib/api/project_snippets.rb | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb index 46f70f2..bee6544 100644 --- a/lib/api/project_snippets.rb +++ b/lib/api/project_snippets.rb @@ -113,6 +113,8 @@ module API # GET /projects/:id/snippets/:snippet_id/raw get ":id/snippets/:snippet_id/raw" do @snippet = user_project.snippets.find(params[:snippet_id]) + + env['api.format'] = :txt content_type 'text/plain' present @snippet.content end -- libgit2 0.21.2