File: optional_conversion_test.exs

package info (click to toggle)
elixir-earmark-parser 1.4.44-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,148 kB
  • sloc: makefile: 9
file content (19 lines) | stat: -rw-r--r-- 453 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
defmodule Test.Functional.Inline.Converter.OptionalConversionTest do
  use Support.InlineConverterCase

  describe "line breaks:" do
    test "classic br" do
      assert convert("  \n ") == [" ", {"br", [], [], %{}}]
    end

    test "no br" do
      assert convert(" \na") == [" \na"]
    end

    test "hard breaks" do
      assert convert(" \na", breaks: true) == ["a", {"br", [], [], %{}}]
    end
  end
end

# SPDX-License-Identifier: Apache-2.0