Open mouse07410 opened 4 years ago
The source text actually says mathcal, but then Javascript goes in and replaces it. In general, Javascript won't run on docs being served up from local disk (as its a security risk), which I suspect is what happens. I personally think that relying on Javascript to format a slightly slopey O instead of just doing italics is a dumb case of making everything worse so pedants can have a fractionally more correct O. In Hoogle I just drop the entire mathcal bit, since I'm splicing in snippets of HTML, and don't want some Javascript going on too, which trashes page reflow time etc. See https://github.com/ndmitchell/hoogle/issues/353
Javascript won't run on docs being served up from local disk (as its a security risk), which I suspect is what happens
As far as I'm concerned, the real security risk is a ton of crappy JavaScript pulled from all over the world that a lot of web sites link to.
I'd much prefer to have a configuration option to allow JavaScript run on docs served from the local disk, as it's an acceptable security risk (after all, I'm running this Cabal executable that came from the 'Net, ain't I? ;).
However, if it's possible to avoid JavaScript altogether - I'd love to embrace that solution. Is it feasible here?
It would be feasible for upstream not to use Javascript, if they wanted faster pages and an irrelevantly less precise font. But upstream seems to have introduced it deliberately and foolishly...
But since upstream is what it is - regardless whether their decision was smart or not, how can we fix it here downstream?
For example, I'd be perfectly happy with simply enabling Javascript to execute files stored on my local disk (I consider that risk far more acceptable than what web browsers do on almost each and every site nowadays).
Ping?
Ping?
Given this issue is fairly minor (visual glitch), and a consequence of upstream making poor decisions, I suspect it's going to be a while before anyone gets around to it. If you're particularly interested, feel free to investigate. For example, is it possible to enable JS in this context? Is JS enabled but the support .js
file not found? Would it be feasible/desirable to rewrite mathcal before rendering it?
I believe this is a similar issue, but it would be nice to have image/gif support on hover as well as math support. On the haddocks:
Even if displaying math or gifs would be difficult to support, it would be good to at least display the raw text (instead of cannot render inline math formula) or the image path location (instead of the little image icon), like what is shown with :doc
:
Same error shows up in the Vim popup.
I still have this problem as of August 2022. I would highly appreciate a fix!
I still have this problem as of August 2022. I would highly appreciate a fix!
+1
I want to re-emphasize that I don't see serious security implications of allowing LaTeX or JavaScript run on local files.
After all, that's what Cabal and Stack do.
I am still seeing this issue as well
I don't think this is something we can solve very easily. We'd have to return raw HTML for the documentation instead of markdown, I think, after generating images for the latex blocks locally. Perhaps not impossible, but tricky.
What about something like https://github.com/fKunstner/latex-to-utf8?
VS Code with the current
haskell-language-server
master, GHC-8.10.1.For some reason, when the Documentation popup is displayed -
\mathcal{}
content is not formatted. Here's what the popup shows:Here's what I see after clicking on "Documentation":
Is it normal, or is there a way to make it formatted properly? How can I change my setup/configuration to enable that? Do I need to install some extra package...?