def render(assigns) do
if assigns.count == 5 do
raise "Crash on render"
end
~H"""
<span><%= @count %></span>
<button phx-click="inc">+</button>
<button phx-click="dec">-</button>
<button phx-click="error">Crash on handle_event</button>
<.link href="/?crash=mount">Crash on mount</.link>
<.link patch="/?crash=handle_params">Crash on handle_params</.link>
<style type="text/css">
body { padding: 1em; }
</style>
"""
end
And I change it to (just added the new class to the first <span> element):
def render(assigns) do
if assigns.count == 5 do
raise "Crash on render"
end
~H"""
<span class="new"><%= @count %></span>
<button phx-click="inc">+</button>
<button phx-click="dec">-</button>
<button phx-click="error">Crash on handle_event</button>
<.link href="/?crash=mount">Crash on mount</.link>
<.link patch="/?crash=handle_params">Crash on handle_params</.link>
<style type="text/css">
body { padding: 1em; }
</style>
"""
end
When using basic git diff it highlights the changed line. On the other hand, difftastic highlights the whole block:
It is important to note that diffs are properly highlighted on HEEx files. The problem appears only on embedded HEEx blocks.
When changing code inside an embedded HEEx sigil on Elixir, difftastic is not highlighting the changes but the whole sigil.
I have the following code:
And I change it to (just added the
new
class to the first<span>
element):When using basic git diff it highlights the changed line. On the other hand, difftastic highlights the whole block:
It is important to note that diffs are properly highlighted on HEEx files. The problem appears only on embedded HEEx blocks.
I am using latest difftastic on MacOS: