Skip to content

Commit

Permalink
preserve whitespace in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
evdevdev committed Sep 13, 2024
1 parent 7ada512 commit caf1493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions app/views/action_prompt/previews/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
<div>
Output
</div>
<div class="bg-gray-100 p-2 rounded-md border shadow-sm">
<%= @prompt_output %>
</div>
<div class="bg-gray-100 p-2 rounded-md border shadow-sm" style="word-wrap: break-word; white-space: pre-wrap;"><%= @prompt_output %></div>
</div>
4 changes: 4 additions & 0 deletions test/dummy/test/prompts/hello_world_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ def hello_world
def hello_somebody
render("hello_somebody", locals: { name: "Lenny" })
end

def hello_multiline_output
render("hello_multiline")
end
end

0 comments on commit caf1493

Please sign in to comment.