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
When README.txt does not finish with a new line: Thumbnail doesn't work; raw html is displayed #165
Comments
Thanks for the precise description! A good way to make it easier to reproduce would be to attach a zip of your |
Ah sorry about that, for some reason I thought that .zip files weren't allowed on github! Here it is attached |
Being able to include zip files is a reasonably recent feature (maybe a few months ago?) |
I had a closer look at the html, and I noticed something off about the double quotation marks in the div class. They appear to be non-ascii. So I had a look at the html source. Here is the div for the non-working bit (hello_world.py):
Compare this to the thumbnail that does work (goodbye_script.py)
|
Yep I can reproduce. Adding a newline at the end of your examples/README.txt fixes it I think. |
To be honest my editor adds new lines automatically if there is none and I am guessing other editors do that as well, so that's probably part of the reason why we never spotted this bug. It's very likely not too hard to fix and it's just a new line to add in the right place in the generated rst. Do open a PR if you have time to investigate further. If not we'll try to fix this one shortly. |
Thanks, I fixed the issue on my end by adding a new line to the end of each README.txt. |
I'm having issues trying to get Sphinx gallery to render thumbnails correctly.
When I build the documentation and open the gallery index.html on my web browser, some of the thumbnails are non-clickable. For those thumbnails that are non-clickable, I get this raw html displayed:
<div class=”sphx-glr-thumbcontainer” tooltip=”This script prints ‘hello world’ “>
. The problem is shown in the attached screenshot.To reproduce this problem I created a simple directory structure like so:
I ran
sphinx_quickstart
indoc/
, using all the default options. Inindex.rst
I addedExamples <auto_examples/index.rst>
to the toctree. Inconf.py
I added the followingYet my thumbnails don't work properly.
I've had this problem occur with sphinx_gallery 1.5.0 using sphinx 1.4.8 on Windows and sphinx 1.4.6 on Linux.
Thanks
The text was updated successfully, but these errors were encountered: