prop/lib/microwaveprop_web/live/algo_live.ex
Graham McIntire 93f2c32971
Remove timex, earmark, dns_cluster deps; add local implementations
- Replace Timex with regex-based timestamp parser (broader format support)
- Replace Earmark with local Markdown.to_html! (headings, code blocks,
  tables, lists, inline formatting, links, horizontal rules)
- Remove dns_cluster (unused, single-instance deployment)
- Add stream_data property tests for timestamp parsing (5 properties
  covering ISO, US dates, AM/PM, format roundtrips, garbage rejection)
- Removes transitive deps: combine, tzdata, hackney, certifi, metrics,
  mimerl, parse_trans, ssl_verify_fun
2026-04-02 12:17:37 -05:00

23 lines
528 B
Elixir

defmodule MicrowavepropWeb.AlgoLive do
@moduledoc false
use MicrowavepropWeb, :live_view
@external_resource "algo.md"
@algo_html "algo.md" |> File.read!() |> Microwaveprop.Markdown.to_html!()
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, page_title: "Algorithm", content: @algo_html)}
end
@impl true
def render(assigns) do
~H"""
<Layouts.app flash={@flash}>
<div class="markdown-content">
{raw(@content)}
</div>
</Layouts.app>
"""
end
end