You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -152,12 +152,13 @@ For example, given the following broken code after an initial `mix format`:
152
152
```elixir
153
153
defmoduleMyGreatLibrarydo
154
154
@moduledocmake_pretty_docs(@library_options)
155
+
useOptionsMagic, my_opts:@library_options
155
156
156
157
@library_options [ ... ]
157
158
end
158
159
```
159
160
160
-
You can fix the code by moving the static value outside of the module into a naked variable and then reference it in the module.
161
+
You can fix the code by moving the static value outside of the module into a naked variable and then reference it in the module. (Note that `use` macros need an `unquote` wrapping the variable!)
161
162
162
163
Yes, this is a thing you can do in a `.ex` file =)
0 commit comments