fix formatting in note/context/step contents

This commit is contained in:
2022-12-20 18:36:56 -05:00
parent 59283a0217
commit c1337ebc10
5 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@ defmodule MemexWeb.Components.ContextContent do
~H"""
<div
id={"show-context-content-#{@context.id}"}
class="input input-primary h-128 min-h-128 inline-block overflow-x-hidden overflow-y-auto"
class="input input-primary h-128 min-h-128 inline-block whitespace-pre-wrap overflow-x-hidden overflow-y-auto"
phx-hook="MaintainAttrs"
phx-update="ignore"
readonly
@ -39,7 +39,6 @@ defmodule MemexWeb.Components.ContextContent do
"</p>#{link}<p class=\"inline\">"
end
)
|> String.replace("\n", "<br>")
|> HTML.raw()
end
end

View File

@ -12,7 +12,7 @@ defmodule MemexWeb.Components.NoteContent do
~H"""
<div
id={"show-note-content-#{@note.id}"}
class="input input-primary h-128 min-h-128 inline-block overflow-x-hidden overflow-y-auto"
class="input input-primary h-128 min-h-128 inline-block whitespace-pre-wrap overflow-x-hidden overflow-y-auto"
phx-hook="MaintainAttrs"
phx-update="ignore"
readonly
@ -39,7 +39,6 @@ defmodule MemexWeb.Components.NoteContent do
"</p>#{link}<p class=\"inline\">"
end
)
|> String.replace("\n", "<br>")
|> HTML.raw()
end
end

View File

@ -12,7 +12,7 @@ defmodule MemexWeb.Components.StepContent do
~H"""
<div
id={"show-step-content-#{@step.id}"}
class="input input-primary h-32 min-h-32 inline-block overflow-x-hidden overflow-y-auto"
class="input input-primary h-32 min-h-32 inline-block whitespace-pre-wrap overflow-x-hidden overflow-y-auto"
phx-hook="MaintainAttrs"
phx-update="ignore"
readonly
@ -39,7 +39,6 @@ defmodule MemexWeb.Components.StepContent do
"</p>#{link}<p class=\"inline\">"
end
)
|> String.replace("\n", "<br>")
|> HTML.raw()
end
end