kartheek

kartheek

makeup_json is a makeup lexer for json. It generates tags very close to Pygments. I have used makeup_elixir code as base and modified it to create this.

iex(1)>json = """
{
  "key": "value"
}
"""

iex(2)>Makeup.highlight(json, lexer: Makeup.Lexers.JsonLexer) |> IO.puts()
# will generate the below tags
<pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nt">&quot;key&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;value&quot;</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>

Please share any feedback or improvements to the lexer.

Showing Posts 1 to 1

kartheek

kartheek OP

makeup_json was released on hex.pm last week.

Thank you optikfluffel, @tmbb and @josevalim.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

rodloboz
I wanted an MCP library for Elixir that does everything you need out of the box, so I built Sake. Auth is usually the hard part. If yo...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 12366 136
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ausimian
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
kip
In 2021 I started a new library called Tempo with the objective of modelling time as a set of intervals - not as instants. In 2022 I gave...
New

Other Trending Topics Top

budgie
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
KristerV
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
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
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
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews