Skip to content

Commit

Permalink
Fix column header formatter return
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Jun 11, 2024
1 parent 3cf1400 commit 017043b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/cldr/kino/data_table.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ defmodule Cldr.Kino.DataTable do

@dialyzer {:nowarn_function, [format: 2]}
def format(:__header__, value) when is_atom(value) do
value
|> to_string()
|> String.capitalize()
|> String.replace("_", " ")
string =
value
|> to_string()
|> String.capitalize()
|> String.replace("_", " ")

{:ok, string}
end

def format(_key, value) do
Expand Down

0 comments on commit 017043b

Please sign in to comment.