Skip to content

Commit

Permalink
hide codeblock before highlighted
Browse files Browse the repository at this point in the history
  • Loading branch information
yujonglee committed Oct 28, 2024
1 parent 14c89bf commit 7e6ae39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const hooks = {
],
}).then((html) => {
this.el.innerHTML = html;
this.el.classList.remove("invisible");
});
},
},
Expand Down
2 changes: 1 addition & 1 deletion core/lib/canary_web/live/example_live/example.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule CanaryWeb.ExampleLive.Example do
<div class="flex flex-col gap-0 mt-4 text-wrap">
<p>Actual code to render above ↓</p>
<code id={@id} phx-hook="Highlight"><%= @example.code %></code>
<code id={@id} phx-hook="Highlight" class="invisible"><%= @example.code %></code>
</div>
</div>
"""
Expand Down

0 comments on commit 7e6ae39

Please sign in to comment.