Skip to content

Commit abb61c9

Browse files
committed
Remove obsolete Null AST node
1 parent 7887a54 commit abb61c9

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

lib/panpipe/ast/nodes.ex

-25
Original file line numberDiff line numberDiff line change
@@ -1478,28 +1478,3 @@ defimpl_ex Panpipe.Pandoc.Span, %{"t" => "Span"}, for: Panpipe.Pandoc.AST.Node d
14781478
}
14791479
end
14801480
end
1481-
1482-
1483-
################################################################################
1484-
# Null - Nothing
1485-
1486-
defmodule Panpipe.AST.Null do
1487-
@moduledoc """
1488-
A `Panpipe.AST.Null` for nodes of the Pandoc AST with the type `Null`.
1489-
1490-
This type of node can be useful when you want to remove another node with
1491-
the `Panpipe.AST.transform/2` function.
1492-
"""
1493-
1494-
use Panpipe.AST.Node, type: :block
1495-
1496-
def child_type(), do: :nil
1497-
1498-
def to_pandoc(%__MODULE__{}), do: %{"t" => "Null"}
1499-
end
1500-
1501-
defimpl_ex Panpipe.Pandoc.Null, %{"t" => "Null"}, for: Panpipe.Pandoc.AST.Node do
1502-
@moduledoc false
1503-
1504-
def to_panpipe(_), do: %Panpipe.AST.Null{}
1505-
end

test/panpipe/pandoc/conversion_test.exs

-6
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,4 @@ defmodule Panpipe.Pandoc.ConversionTest do
305305
assert Panpipe.Pandoc.Conversion.convert(span, to: :markdown) == "Example"
306306
assert Panpipe.Pandoc.Conversion.convert(span, to: :plain) == "Example"
307307
end
308-
309-
test "AST.Null" do
310-
null = %Panpipe.AST.Null{}
311-
assert Panpipe.Pandoc.Conversion.convert(null, to: :markdown) == "\n"
312-
assert Panpipe.Pandoc.Conversion.convert(null, to: :plain) == "\n"
313-
end
314308
end

0 commit comments

Comments
 (0)