You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 28, 2022. It is now read-only.
I am assuming the reason they are intertwined is because of the ToMarkup instance, but IMO how the markdown doc is converted to Html is not an inherent part of the markdown itself.
For my use case I will probably never actually use the ToMarkup instance, as I'm writing a custom markdown renderer on top that outputs a Miso View. So the Options will never actually be used.
When I saw the Options in the Doc I ended up just source diving to see what exactly it does, as from the surface it looks as though the markdown function itself might use it, which it basically doesn't (except for the debug flag which IMO isn't needed since Doc has a Show instance).
I think the developer experience would be nicer if Options was removed from Doc, and renderDoc was tweaked to have type Options -> Doc -> Html. As that would make it obvious that Options is not for markdown parsing or manipulating itself, but purely for outputting it to Html.
I am assuming the reason they are intertwined is because of the
ToMarkupinstance, but IMO how the markdown doc is converted to Html is not an inherent part of the markdown itself.For my use case I will probably never actually use the
ToMarkupinstance, as I'm writing a custom markdown renderer on top that outputs a Miso View. So theOptionswill never actually be used.When I saw the
Optionsin theDocI ended up just source diving to see what exactly it does, as from the surface it looks as though themarkdownfunction itself might use it, which it basically doesn't (except for thedebugflag which IMO isn't needed sinceDochas aShowinstance).I think the developer experience would be nicer if
Optionswas removed fromDoc, andrenderDocwas tweaked to have typeOptions -> Doc -> Html. As that would make it obvious thatOptionsis not for markdown parsing or manipulating itself, but purely for outputting it to Html.