Skip to content

Commit 4c6311c

Browse files
committed
fill empty fields
1 parent 7982793 commit 4c6311c

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/xinterpreter.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,19 +303,24 @@ namespace xpyt
303303
{"url", "https://xeus-python.readthedocs.io"}
304304
});
305305

306+
nl::json codemirror_mode = {
307+
{"name", "ipython"},
308+
{"version", PY_MAJOR_VERSION}
309+
};
310+
306311
return xeus::create_info_reply(
307-
"5.3", // protocol_version
312+
"5.3", // protocol_version
308313
"xeus-python", // implementation
309314
XPYT_VERSION, // implementation_version
310315
"python", // language_name
311316
PY_VERSION, // language_version
312317
"text/x-python", // language_mimetype
313318
".py", // language_file_extension
314-
"", // pygments_lexer
315-
"", // language_codemirror_mode
316-
"", // language_nbconvert_exporter
319+
"ipython" + std::to_string(PY_MAJOR_VERSION), // pygments_lexer
320+
codemirror_mode, // language_codemirror_mode
321+
"python", // language_nbconvert_exporter
317322
banner, // banner
318-
(PY_MAJOR_VERSION != 3) || (PY_MAJOR_VERSION != 13), // debugger
323+
(PY_MAJOR_VERSION != 3) || (PY_MINOR_VERSION != 13), // debugger
319324
help_links // help_links
320325
);
321326
}

src/xinterpreter_raw.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ namespace xpyt
305305
"\n");
306306
#endif
307307

308+
309+
nl::json codemirror_mode = {
310+
{"name", "ipython"},
311+
{"version", PY_MAJOR_VERSION}
312+
};
313+
308314
nl::json help_links = nl::json::array();
309315
help_links.push_back({
310316
{"text", "Xeus-Python Reference"},
@@ -319,9 +325,9 @@ namespace xpyt
319325
PY_VERSION, // language_version
320326
"text/x-python", // language_mimetype
321327
".py", // language_file_extension
322-
"", // pygments_lexer
323-
"", // language_codemirror_mode
324-
"", // language_nbconvert_exporter
328+
"ipython" + std::to_string(PY_MAJOR_VERSION), // pygments_lexer
329+
codemirror_mode, // language_codemirror_mode
330+
"python", // language_nbconvert_exporter
325331
banner, // banner
326332
false, // debugger
327333
help_links // help_links

0 commit comments

Comments
 (0)