'use strict';

var _codemirror = require('codemirror');

var _codemirror2 = _interopRequireDefault(_codemirror);

require('codemirror/mode/meta');

require('codemirror/mode/python/python');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

_codemirror2.default.defineMode('ipython', (conf, parserConf) => {
  const ipythonConf = Object.assign({}, parserConf, {
    name: 'python',
    singleOperators: new RegExp('^[\\+\\-\\*/%&|@\\^~<>!\\?]'),
    identifiers: new RegExp('^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*') });
  return _codemirror2.default.getMode(conf, ipythonConf);
}, 'python'); // https://github.com/nteract/nteract/issues/389


_codemirror2.default.defineMIME('text/x-ipython', 'ipython');