haddock icon indicating copy to clipboard operation
haddock copied to clipboard

HTML fragment

Open tonyday567 opened this issue 2 years ago • 3 comments

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?

tonyday567 avatar May 28 '22 06:05 tonyday567

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.

Kleidukos avatar May 28 '22 07:05 Kleidukos

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

tonyday567 avatar May 28 '22 11:05 tonyday567

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

Kleidukos avatar May 28 '22 13:05 Kleidukos