Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--mathjax does not work consistently #475

Closed
nomeata opened this issue Jan 15, 2016 · 0 comments
Closed

--mathjax does not work consistently #475

nomeata opened this issue Jan 15, 2016 · 0 comments

Comments

@nomeata
Copy link
Contributor

nomeata commented Jan 15, 2016

In Debian, the files we ship must not rely on external data, so we cannot use mathjax from the CDN. Luckily, haddock provides a --mathjax flag that allows to specify the URL to use, which we do (--mathjax=file:///usr/share/javascript/mathjax/MathJax.js).

Unfortunately, it does not work everywhere: It has an effect on index.html, but not other HTML pages generated by haddock.

The problem is that in haddock-api/src/Haddock/Backends/Xhtml.hs, maybe_mathjax_url is not passed around consistently, and sometimes headHtml is then called with Nothing.

It would probably be (type-)safer to pass this as a String and not as a Maybe String, and set the default in the argument parser. This way, you cannot “forget” to pass it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant