Hi Jim, I can't get the basic example to work : inline math is not displayed.
I have made the simplest functioning code I can think of to showcase the issue, because I can't see what I am doing wrong.
FYI we will be using extensively the parsing / rendering part of the module.
module Main exposing (..)
import Browser
import Html exposing (Html, div)
import Markdown.Option exposing (MarkdownOption(..))
import Markdown.Render as Mkdn exposing (MarkdownMsg)
type alias Model =
String
init : ( Model, Cmd Msg )
init =
( math, Cmd.none )
math =
" This is inline math : $ a^2 + b^2 = c^2 $ "
type Msg
= MkdnMsg Mkdn.MarkdownMsg
update : Msg -> Model -> ( Model, Cmd Msg )
update _ model =
( model, Cmd.none )
view : Model -> Html Msg
view model =
div []
[ Mkdn.toHtml ExtendedMath model |> Html.map MkdnMsg ]
main : Program () Model Msg
main =
Browser.element
{ view = view
, init = \_ -> init
, update = update
, subscriptions = always Sub.none
}
Hi Jim, I can't get the basic example to work : inline math is not displayed.
I have made the simplest functioning code I can think of to showcase the issue, because I can't see what I am doing wrong.
FYI we will be using extensively the parsing / rendering part of the module.