Skip to content

Commit

Permalink
Remove temporary fix for converter to v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
msaraiva committed Sep 19, 2024
1 parent 13c2b6f commit 06e1c8f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions lib/surface/compiler/tokenizer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ defmodule Surface.Compiler.Tokenizer do
column = Keyword.get(opts, :column, 1)
indentation = Keyword.get(opts, :indentation, 0)

# TODO: Fix for the converter. Remove `embedded_expr?` eventually after 0.5.0 is released
state = %{file: file, column_offset: indentation + 1, braces: [], embedded_expr?: false}
state = %{file: file, column_offset: indentation + 1, braces: []}

handle_text(text, line, column, [], [], state)
end
Expand Down Expand Up @@ -623,23 +622,6 @@ defmodule Surface.Compiler.Tokenizer do
handle_attr_value_double_quote(rest, line + 1, column, ["\n" | buffer], acc, state)
end

# TODO: Fix for the converter. Remove it eventually after 0.5.0 is released
defp handle_attr_value_double_quote("{{" <> rest, line, column, buffer, acc, state) do
state = %{state | embedded_expr?: true}
handle_attr_value_double_quote(rest, line, column + 2, ["{{" | buffer], acc, state)
end

defp handle_attr_value_double_quote("}}" <> rest, line, column, buffer, acc, state) do
state = %{state | embedded_expr?: false}
handle_attr_value_double_quote(rest, line, column + 2, ["{{" | buffer], acc, state)
end

defp handle_attr_value_double_quote("\"" <> rest, line, column, buffer, acc, %{embedded_expr?: true} = state) do
handle_attr_value_double_quote(rest, line, column + 1, ["\"" | buffer], acc, state)
end

###

defp handle_attr_value_double_quote("\"" <> rest, line, column, buffer, acc, state) do
value = buffer_to_string(buffer)

Expand Down

0 comments on commit 06e1c8f

Please sign in to comment.