tadasajon
Suppose I have a *.heex template file that I am iterating rapidly on and I just want to comment out a chunk of it for a few moments. What is the syntax for this? Most of the approaches I have tried just throw errors.
I have resorted to just creating a new empty file, then deleting the lines I want to comment out entirely, saving them in the new file, then copy-pasting them back in later when I want to uncomment them. This is super-laborious.
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
kokolegorille
Like in any html file?
tadasajon
When I try using
<!-- -->I get this:Here is the state of the file that gives me that error:
kokolegorille
I’m sorry, I was testing on eex file
You might find some tips in this issue…
https://github.com/phoenixframework/phoenix_live_view/issues/1590
tadasajon
Thanks. That issue seems to be directly related to my problem. I’m still not crystal clear on how to comment out lines in a
*.heexfile, though – I asked for some more clarification in the issue.f0rest8
Did you try
<%# commented html code here %>Just looked at your code, the example I just gave will work until you hit your other
%>— woops, thanks for the catch @APB9785.I’m pretty sure I don’t have this issue in my heex files using the standard html comment syntax. I’ll check later and let you know why/if it works for me.
APB9785
The opening
<%is fine, it’s the closing%>that will end the comment prematurely.tadasajon
In this example:
I have tried commenting-out the third list item using the syntax you suggested. I get the following error:
The problem is that there is a
<%= something %>within the section that I want to enclose in the comment, so the ending tag for that something ends up closing the comment.APB9785
Mine work OK too for single and multi lines, but if I add a
<%= anything %>to the comment, then I will get the aforementioned compilation error.f0rest8
Yes, just quickly checked and I can second @tadasajon and @APB9785 that I receive that compilation error when
<%= something %>pops up inside the comment.APB9785
Adding
{anything}to the comment seems to work fine, though. But that won’t solve the problem, because standalone{anything}doesn’t evaluate.