haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 241 forks source link

HTML fragment #1494

Open tonyday567 opened 2 years ago

tonyday567 commented 2 years ago

Does haddock accept HTML fragments?

In the numhask haddock, I have an svg image in the docs, and haddock renders:

![nh](docs/other/nh.svg)

as

<img src="docs/other/nh.svg" title="nh">

The image would be clickable and link to the codebase if I could say:

<object data="docs/other/nh.svg" type="image/svg+xml"></object>

If this is not possible at the moment, would it be difficult to develop a solution?

Kleidukos commented 2 years ago

Hey, I don't think it is possible at the moment, unfortunately.

I think there is an unavoidable level of complexity in doing so, but it is not impossible.

tonyday567 commented 2 years ago

I imagine it being a subset of the markdown enhancements given that arbitrary html is part of most markdown standards.

Kleidukos commented 2 years ago

Oh yes we are definitely getting this for free once Markdown is supported