Skip to content

Commit

Permalink
Don’t stringify booleans and numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei Matiushkin committed Mar 21, 2024
1 parent e5da445 commit 0d5f061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/estructura/aston.ex
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ defmodule Estructura.Aston do
do: {name, attributes, ast_content(content)}

defp ast_content(nil), do: ""
defp ast_content(true), do: "true"
defp ast_content(false), do: "false"
defp ast_content(number) when is_number(number), do: "#{number}"
defp ast_content(true), do: true
defp ast_content(false), do: false
defp ast_content(number) when is_number(number), do: number
defp ast_content(text_node) when is_binary(text_node), do: text_node
defp ast_content(list) when is_list(list), do: Enum.map(list, &ast_content/1)

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Estructura.MixProject do
use Mix.Project

@app :estructura
@version "1.3.2"
@version "1.3.3"

def project do
[
Expand Down

0 comments on commit 0d5f061

Please sign in to comment.