Show More
@@ -240,11 +240,12 b' define([' | |||||
240 | this.events.on('kernel_ready.Kernel', function(event, data) { |
|
240 | this.events.on('kernel_ready.Kernel', function(event, data) { | |
241 | var kinfo = data.kernel.info_reply; |
|
241 | var kinfo = data.kernel.info_reply; | |
242 | var langinfo = kinfo.language_info || {}; |
|
242 | var langinfo = kinfo.language_info || {}; | |
243 |
if (!langinfo.name) |
|
243 | if (!langinfo.name) { | |
244 |
|
244 | langinfo.name = kinfo.language; | ||
|
245 | } | |||
245 | that.metadata.language_info = langinfo; |
|
246 | that.metadata.language_info = langinfo; | |
246 | // Mode 'null' should be plain, unhighlighted text. |
|
247 | // Mode 'null' should be plain, unhighlighted text. | |
247 |
var cm_mode = langinfo.codemirror_mode || langinfo. |
|
248 | var cm_mode = langinfo.codemirror_mode || langinfo.name || 'null'; | |
248 | that.set_codemirror_mode(cm_mode); |
|
249 | that.set_codemirror_mode(cm_mode); | |
249 | }); |
|
250 | }); | |
250 |
|
251 | |||
@@ -1828,7 +1829,7 b' define([' | |||||
1828 | if (this.metadata.language_info !== undefined) { |
|
1829 | if (this.metadata.language_info !== undefined) { | |
1829 | var langinfo = this.metadata.language_info; |
|
1830 | var langinfo = this.metadata.language_info; | |
1830 | // Mode 'null' should be plain, unhighlighted text. |
|
1831 | // Mode 'null' should be plain, unhighlighted text. | |
1831 |
var cm_mode = langinfo.codemirror_mode || langinfo. |
|
1832 | var cm_mode = langinfo.codemirror_mode || langinfo.name || 'null'; | |
1832 | this.set_codemirror_mode(cm_mode); |
|
1833 | this.set_codemirror_mode(cm_mode); | |
1833 | } |
|
1834 | } | |
1834 |
|
1835 |
General Comments 0
You need to be logged in to leave comments.
Login now