axelson
MakeupLiveFormat - Website to highlight elixir code
Recently, I wanted an easy way to highlight elixir code, and I wanted to use @tmbb’s excellent Makeup library to do so, but it was annoying to get some nice visual output so I decided to create a Phoenix LiveView-powered website to help others with the same issue. Simply paste in your elixir code into the text box and it will immediately be highlighted:
Try it out here: https://makeup-live-format.herokuapp.com/
Most Liked
tmbb
@axelson I just wanted to say that I wholeheartedly approve of this demo xD I’ve meant to write something like it for a while, but I never made the time for it.
I wonder if there could be a way for the user to tag code as “looking wrong”, which would cause an email to be sent somewhere (or maybe a bot that creates a GitHub issue in the lexer’s repo?) I can see this being abused though… Maybe if it were protected by a captcha?
josevalim
To be clear, it is \r\n (as emitted by Windows) and Elixir’s parser does handle it. \n\r would not be handled.
axelson
Hi @alvises, thanks for the kind words! De-bouncing is a good idea so I’ve added it in Add debounce on input by axelson · Pull Request #10 · axelson/makeup_live_format · GitHub
Also if anyone is curious what a PR that updates a LiveView project from 0.4.1 to 0.11.1 they can look at: Update phoenix live view by axelson · Pull Request #8 · axelson/makeup_live_format · GitHub along with Handle removal of live_view.css by axelson · Pull Request #9 · axelson/makeup_live_format · GitHub (since I missed a breaking change the first time)
As a side-note I wish there was a way to for phx-throttle to work similarly to lodash’s throttle with leading=true and trailing=true: Lodash Documentation but that should really be a separate forum topic.
Popular in Discussions
Other popular topics
Latest Phoenix Threads
Chat & Discussions>Discussions
Latest on Elixir Forum
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
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










