Closed dispanser closed 6 years ago
The HTML should be quite readable to a machine, not too hard to strip out. The information about coloring etc seems valuable to many consumers of the API, which is why I included it. Suggestions?
Thanks for your response. From my perspective, adding html markup is easier than removing it, but if you prefer the current approach (I assume it's used somewhere already in its current form), I'll just keep stripping the markup off.
For reference, I'm coming from https://github.com/gibiansky/IHaskell/pull/825 which attempts to adapt ihaskell kernel to the new hoogle.
Closing
The HTML markup actually makes it into the Hoogle databases at the end, so gets added (and has to be added) offline, before the results are generated. Removing it would require some post processing, which is no harder or easier on your side. I confirm it is used several times in it's current form. Note that the markup also says which arguments map to which, which might be valuable in IHaskell at a future date.
Using hoogle 5, the json response contains html markup and escape sequences (
>
).E.g., when querying
https://hoogle.haskell.org/?mode=json&hoogle=fmap&count=1
, formatted json response is:I think that the default behavior shouldn't contain any markup, as it's supposed to be consumed by a machine.