- 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
23 lines
528 B
Elixir
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
|