This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// derived from https://github.com/scniro/react-codemirror2/blob/master/src/index.tsx | |
import React from 'react' | |
const SERVER_RENDERED = process.env.UIX_ENV == 'express' | |
let CodeMirror | |
if (!SERVER_RENDERED) { | |
CodeMirror = require('codemirror') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Copyright 2006-2015 Mitchell mitchell.att.foicica.com. See LICENSE. | |
-- JavaScript LPeg lexer. | |
local l = require('lexer') | |
local token, word_match = l.token, l.word_match | |
local P, R, S = lpeg.P, lpeg.R, lpeg.S | |
local M = {_NAME = 'javascript'} | |
-- Whitespace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
try: | |
from lxml import etree | |
except ImportError: | |
import xml.etree.ElementTree as etree | |
import StringIO | |
import time | |
from itertools import product | |
s = """ |