From c9a56ced1d2a0c498dc99cf7b8293ac37d60582a Mon Sep 17 00:00:00 2001 From: dgelessus <dgelessus@users.noreply.github.com> Date: Mon, 13 Aug 2018 14:23:46 +0200 Subject: [PATCH] Fix image display in table generated by :show Markdown does not allow Markdown syntax to be used inside HTML tags. Jupyter Notebook previously allowed this, but this was likely fixed in a recent version. The images are now inserted using <img/> tags instead of Markdown image syntax, so it should now work without problems. --- src/main/java/de/prob2/jupyter/commands/ShowCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/prob2/jupyter/commands/ShowCommand.java b/src/main/java/de/prob2/jupyter/commands/ShowCommand.java index 3a3af35..b294f0b 100644 --- a/src/main/java/de/prob2/jupyter/commands/ShowCommand.java +++ b/src/main/java/de/prob2/jupyter/commands/ShowCommand.java @@ -104,7 +104,7 @@ public final class ShowCommand implements Command { contents = ""; } else if (entry instanceof Integer) { padding = imagePadding; - contents = String.format("", entry, images.get(entry)); + contents = String.format("<img alt=\"%d\" src=\"%s\"/>", entry, images.get(entry)); } else if (entry instanceof String) { padding = stringPadding; contents = (String)entry; -- GitLab