Skip to content

Commit

Permalink
Document having curly braces text literals in heex (#3554)
Browse files Browse the repository at this point in the history
* Document having curly braces text literals in heex

* Update lib/phoenix_component.ex

---------

Co-authored-by: Steffen Deusch <[email protected]>
  • Loading branch information
LostKobrakai and SteffenDE authored Dec 5, 2024
1 parent f5a7768 commit e8507cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/phoenix_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,12 @@ defmodule Phoenix.Component do
However, for conditionals and for-comprehensions, there are built-in constructs
in HEEx too, which we will explore next.
> #### Curly braces in text within tag bodies {: .tip}
>
> If you have text in your tag bodies, which includes curly braces you can use
> `&lbrace;` or `<%= "{" %>` to prevent them from being considered the start of
> interpolation.
### Special attributes
Apart from normal HTML attributes, HEEx also supports some special attributes
Expand Down

0 comments on commit e8507cc

Please sign in to comment.