From d2f5559c271faf4a4e74c7eb24e7f1ec5e1c9704 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Sun, 26 Mar 2023 22:19:16 +0200 Subject: [PATCH 1/5] fixes #8 --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index edde7b1..b635183 100644 --- a/src/index.js +++ b/src/index.js @@ -299,8 +299,8 @@ class JupyterConverter { if (type === 'strong') { return `**${node.getText()}**` } - if (type === 'asciimath') { - return `\\\\(${node.getText()}\\\\)` + if (type === 'asciimath' || type === 'latexmath') { + return `$${node.getText()}$` } if (type === 'unquoted') { return node.getText() From 2665d4ab59c2601d0d75216623b6ac71a5353886 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Sun, 26 Mar 2023 23:13:18 +0200 Subject: [PATCH 2/5] fixes #10 add an extra `\n` to ensure enough room around list --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index b635183..09c1e99 100644 --- a/src/index.js +++ b/src/index.js @@ -175,7 +175,7 @@ class JupyterConverter { cells[0].source.unshift('\n') } if (cells.length > 1) { - cells[cells.length - 1].source.push('\n') + cells[cells.length - 1].source.push('\n\n') } return cells } From 188624a862f377084723d5b577811b74b31ed04c Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Tue, 28 Mar 2023 22:36:57 +0200 Subject: [PATCH 3/5] revert --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 09c1e99..b635183 100644 --- a/src/index.js +++ b/src/index.js @@ -175,7 +175,7 @@ class JupyterConverter { cells[0].source.unshift('\n') } if (cells.length > 1) { - cells[cells.length - 1].source.push('\n\n') + cells[cells.length - 1].source.push('\n') } return cells } From dba6fee75e1fd965d577c326531182deac1704ef Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 20 Sep 2023 08:37:15 +0200 Subject: [PATCH 4/5] revert back --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ea37ea8..9ba0397 100644 --- a/src/index.js +++ b/src/index.js @@ -498,4 +498,4 @@ module.exports.register = function (registry, context) { ConverterFactory = AsciidoctorModule.$$.ConverterFactory } ConverterFactory.register(JupyterConverter, ['jupyter']) -} +} \ No newline at end of file From 3ddabb7146b6e04b7f4ef72a1b64a854c05a3738 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 20 Sep 2023 08:41:02 +0200 Subject: [PATCH 5/5] add support for cpp #25 --- src/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/index.js b/src/index.js index 9ba0397..200add6 100644 --- a/src/index.js +++ b/src/index.js @@ -169,6 +169,18 @@ class JupyterConverter { outputs: [], source }] + } else if (language === 'cpp' || language === 'c++') { + return [{ + cell_type: 'code', + execution_count: 0, + metadata: { + slideshow: { + slide_type: 'fragment' + } + }, + outputs: [], + source + }] } else { return [{ cell_type: 'markdown',