PY-21447 Jupyter Notebook fails to properly handle IPython.display Markdown

load remote mathjax because it can't resolve it's dependencies inside jar
This commit is contained in:
Ekaterina Tuzova
2016-12-15 16:16:16 +03:00
parent 1d12240250
commit 04a5bd8cd2
2 changed files with 3 additions and 4 deletions
@@ -60,9 +60,7 @@ public class IpnbJfxUtils {
" }\n" +
" });\n" +
"</script><script type=\"text/javascript\"\n" +
" src=\"" +
IpnbFileType.class.getResource("/MathJax/MathJax.js") +
"?config=TeX-AMS_HTML-full\">\n" +
" src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full\">\n" +
" </script>" + ourBody;
private static final String ourPrefix = ourStyle + ourBody;
private static final String ourPostfix = "</div></body></html>";
@@ -102,6 +100,7 @@ public class IpnbJfxUtils {
final BorderPane pane = new BorderPane(webView);
final String prefix;
if (hasMath) {
prefix = String.format(ourMathJaxPrefix, width - 500, EditorColorsManager.getInstance().getGlobalScheme().getEditorFontSize());
}
else {
@@ -361,7 +361,7 @@ public class IpnbParser {
}
raw.data = dataRaw;
raw.execution_count = outputCell.getPromptNumber();
raw.output_type = "execute_result";
raw.output_type = outputCell.getPromptNumber() != null ? "execute_result" : "display_data";
}
else {
raw.latex = ((IpnbLatexOutputCell)outputCell).getLatex();