mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user