mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-31 03:07:53 +08:00
c6f9c54f31
* Buffer IO evaluation output * Respect CR in IOProxy * Handle CR when adding cell output rather than during each render * Optimise CR handling in buffer
15 lines
471 B
Elixir
15 lines
471 B
Elixir
defmodule LivebookWeb.HelpersTest do
|
|
use ExUnit.Case, async: true
|
|
|
|
alias LivebookWeb.Helpers
|
|
|
|
describe "ansi_to_html_lines/1" do
|
|
test "puts every line in its own tag" do
|
|
assert [
|
|
{:safe, ~s{<span style="color: var(--ansi-color-blue);">smiley</span>}},
|
|
{:safe, ~s{<span style="color: var(--ansi-color-blue);">cat</span>}}
|
|
] ==
|
|
Helpers.ansi_to_html_lines("\e[34msmiley\ncat\e[0m")
|
|
end
|
|
end
|
|
end
|