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

Fix Sphinx extension #9

Merged
merged 2 commits into from
Jun 5, 2016
Merged

Fix Sphinx extension #9

merged 2 commits into from
Jun 5, 2016

Conversation

lidavidm
Copy link
Member

@lidavidm lidavidm commented May 8, 2016

Changes:

  • Scans all code blocks, not just ones with the highlight-python class which Sphinx no longer adds
  • Fixes issue where first line of each code block was ignored

Demo: http://lidavidm.github.io/sympy (may need to force-refresh, Control-Shift-R)

lidavidm added 2 commits May 8, 2016 10:16
Sphinx now seems to use the 'highlight-default' class for all
code blocks, including Python ones, so we were not processing
any of them. This commit changes the extension to scan all code
blocks to avoid this.
Sphinx adds a blank span tag to the beginning of each code block
now, which broke the feature that let you click on a line to
execute it. Now the extension considers the content of the first
two elements in each line of code when deciding whether a line is
a Python statement or output, avoiding this problem.
@asmeurer
Copy link
Member

asmeurer commented May 9, 2016

None of the javascript is loading on the demo page because it's not being served over https.

@asmeurer
Copy link
Member

asmeurer commented May 9, 2016

@lidavidm
Copy link
Member Author

lidavidm commented May 9, 2016

Hmm, it should work without HTTPS. However, the certificate for the appspot.com domain doesn't support sub-subdomains, so we can't test it. I did just redeploy with HTTPS enabled, but no dice - the certificate validation fails.

@asmeurer
Copy link
Member

asmeurer commented May 9, 2016

Well docs.sympy.org its itself not https, so this won't be an issue when we deploy there. So I'm +1 to just merge this if it works.

@lidavidm
Copy link
Member Author

lidavidm commented May 9, 2016

Well, pushing with secure: always just broke the demo even without HTTPS. Let me fix that. The demo should work without HTTPS otherwise.

@lidavidm
Copy link
Member Author

lidavidm commented May 9, 2016

Alright, the demo should work again.

@asmeurer
Copy link
Member

asmeurer commented May 9, 2016

I forgot that you can manually load unsafe scripts in Chrome. This seems to work.

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

Successfully merging this pull request may close these issues.

2 participants