axelson
Scenic Core Team
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/
Trending in Discussions
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
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
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Eiji
I tried it and thee is a bit annoying bug with double newlines (only in rendered) which appear on any input (even if I just press space at end of default input). Can you please fix it?
axelson
Hmmm, I’m not able to reproduce that, what browser are you using?
Eiji
Vivaldi - Chromium-based
EDIT: Looks like my browser handles
white-spacestyle in different way than yours.For me all values except
initial,normalandnowrapadds extra newline-likeCSSbehaviour. Alsoinitial,normal,nowrapandpre-linehaveCSSbehaviour which looks like it remove spaces at start of line.axelson
Hmmm, so what type of styling would you need to get the same behavior that other browsers have?
Eiji
Sorry, I just found it’s not that. I have compared a default
HTMLwith generated one and see extraspanwith classerr- no idea why.This is how it looks like by default:
and here it’s how I cut and paste exactly same code:
Those
spancontains one newline character. When I remove that extraspan, it’s contents or just setdisplaytononethen the code looks as expected.Eiji
Ok, I found why that extra
spanis generated! I suggest you to inspecttextwhich comes from socket.This is default inspected:
And here is the one from socket:
tmbb
Nasty…
This is not a Bug in this application. It actually exposes a bug in the Elixir lexer, which is that the
\rcharacter from windows line endings isn’t matched by the lexer. When used on windows, Elixir seems to conver\n\rinto\n, but when used somewhere else it doesn’t. The problem is probably that @Eiji (and me) are sending strings from Windows which are parsed with Elixir running on a Unix system. That way, the\rcharacter is flagged as an error (which generates the extra span tags - very annoying).The fix seems pretty obvious, the problem is that I’m not sure on how to test it in a portable way.
Eiji
Pretty funny, but I’m not even using
Windows. I’m onopenSUSE Tumbleweed. Did something strange happen inLinuxworld last time?@axelson I have send 3 small pull requests. One of them is a simple fix to replace that newlines.
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?
tmbb
Even though you’re using linux, it seems like your browser is sending windows-style strings through the websocket… Is that some kind of web standard in which JS treats all strings as being windows-style? I have to look into it
I’m not sure such a fix would be a good idea. I think the Elixir lexer should be handing this input correctly, that is, it should recognize the
\n\rsequence as whitespace. Unless there is something in the Elixir “standard” that says that the compiler is not meant to accept strings with windows-style endings… Is there?