mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
838eddaedb
Part of the ongoing effort to expand the amount of languages that can be highlighted by syntaxhighlight module to match that of SyntaxHighlight GeSHi extension. The module now separates language names with their file names. Change-Id: Iaf907ebeadc9432719a45f4e9e8d580bb32ca668
56 lines
6.1 KiB
JSON
56 lines
6.1 KiB
JSON
{
|
|
"highlighter" :
|
|
[
|
|
{
|
|
"match" : "/(\\=|:\\=|\\|\\||\\&\\&|!|=|<=>|>=|>|<=|<|<>|!=|\\||\\&|\\^|~|<<|>>|-|\\+|\\*|/|\\%|\\(|\\)|,|;|)/g",
|
|
"style" : "ve-ce-mwSynHi-symbol"
|
|
},
|
|
{
|
|
"match" : "/[\\W|^]((ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|ASC|AS|BDB|BEGIN|BERKELEYDB|BINARY|BTREE|CALL|CASCADED|CASCADE|CHAIN|CHANGE|CHECK|COLUMNS|COLUMN|COMMENT|COMMIT|COMMITTED|CONSTRAINT|CONTAINSSQL|CONSISTENT|CONVERT|CREATE|CROSS|DATA|DATABASES|DECLARE|DEFINER|DELAYED|DELETE|DESCRIBE|DESC|DETERMINISTIC|DISABLE|DISCARD|DISTINCTROW|DISTINCT|DO|DROP|DUMPFILE|DUPLICATEKEY|ENABLE|ENCLOSEDBY|ENGINE|ERRORS|ESCAPEDBY|EXISTS|EXPLAIN|EXTENDED|FIELDS|FIRST|FOREACHROW|FORCE|FOREIGNKEY|FROM|FULL|FUNCTION|GLOBAL|GRANT|GROUPBY|HANDLER|HASH|HAVING|HELP|HIGH_PRIORITY|IFNOTEXISTS|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INTO|INVOKER|ISOLATIONLEVEL|JOIN|KEYS|KEY|KILL|LANGUAGESQL|LAST|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|MASTER_SERVER_ID|MATCH|MERGE|MIDDLEINT|MODIFIESSQLDATA|MODIFY|MRG_MYISAM|NATURAL|NEXT|NOSQL|NO|ON|OPTIMIZE|OPTIONALLY|OPTION|ORDERBY|OUTER|OUTFILE|OUT|PARTIAL|PARTITION|PREV|PRIMARYKEY|PRIVILEGES|PROCEDURE|PURGE|QUICK|READSSQLDATA|READ|REFERENCES|RELEASE|RENAME|REORGANIZE|REPEATABLE|REQUIRE|RESTRICT|RETURNS|REVOKE|ROLLBACK|ROUTINE|RTREE|SAVEPOINT|SELECT|SERIALIZABLE|SESSION|SET|SHAREMODE|SHOW|SIMPLE|SNAPSHOT|SOME|SONAME|SQLSECURITY|SQL_BIG_RESULT|SQL_BUFFER_RESULT|SQL_CACHE|SQL_CALC_FOUND_ROWS|SQL_NO_CACHE|SQL_SMALL_RESULT|SSL|START|STARTINGBY|STATUS|STRAIGHT_JOIN|STRIPED|TABLESPACE|TABLES|TABLE|TEMPORARY|TEMPTABLE|TERMINATEDBY|TO|TRANSACTIONS|TRANSACTION|TRIGGER|TYPES|TYPE|UNCOMMITTED|UNDEFINED|UNION|UNLOCK_TABLES|UPDATE|USAGE|USE|USER_RESOURCES|USING|VALUES|VALUE|VIEW|WARNINGS|WHERE|WITHROLLUP|WITH|WORK|WRITE))(?!\\w)/gm",
|
|
"style" : "ve-ce-mwSynHi-keyword"
|
|
},
|
|
{
|
|
"match" : "/[\\W|^]((FALSE|NULL|TRUE))(?!\\w)/g",
|
|
"style" : "ve-ce-mwSynHi-metaconstant"
|
|
},
|
|
{
|
|
"match" : "/[\\W|^]((ASCII|BIN|BIT_LENGTH|CHAR_LENGTH|CHARACTER_LENGTH|CONCAT_WS|CONCAT|ELT|EXPORT_SET|FIELD|FIND_IN_SET|FORMAT|HEX|INSTR|LCASE|LEFT|LENGTH|LOAD_FILE|LOCATE|LOWER|LPAD|LTRIM|MAKE_SET|MID|OCTET_LENGTH|ORD|POSITION|QUOTE|REPEAT|REVERSE|RIGHT|RPAD|RTRIM|SOUNDEX|SPACE|STRCMP|SUBSTRING_INDEX|SUBSTRING|TRIM|UCASE|UNHEX|UPPER|ABS|ACOS|ASIN|ATAN2|ATAN|CEILING|CEIL|CONV|COS|COT|CRC32|DEGREES|EXP|FLOOR|LN|LOG10|LOG2|LOG|MOD|OCT|PI|POWER|POW|RADIANS|RAND|ROUND|SIGN|SIN|SQRT|TAN|ADDDATE|ADDTIME|CONVERT_TZ|CURDATE|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURTIME|DATE_ADD|DATE_FORMAT|DATE_SUB|DATEDIFF|DAYNAME|DAYOFMONTH|DAYOFWEEK|DAYOFYEAR|EXTRACT|FROM_DAYS|FROM_UNIXTIME|GET_FORMAT|LAST_DAY|LOCALTIME|LOCALTIMESTAMP|MAKEDATE|MAKETIME|MONTHNAME|NOW|PERIOD_ADD|PERIOD_DIFF|SEC_TO_TIME|STR_TO_DATE|SUBDATE|SUBTIME|SYSDATE|TIME_FORMAT|TIME_TO_SEC|TIMESTAMPADD|TIMESTAMPDIFF|TO_DAYS|UNIX_TIMESTAMP|UTC_DATE|UTC_TIME|UTC_TIMESTAMP|WEEKDAY|WEEKOFYEAR|YEARWEEK|COALESCE|GREATEST|ISNULL|LEAST|AES_DECRYPT|AES_ENCRYPT|COMPRESS|DECODE|DES_DECRYPT|DES_ENCRYPT|ENCODE|ENCRYPT|MD5|OLD_PASSWORD|PASSWORD|SHA1|SHA|UNCOMPRESS|UNCOMPRESSED_LENGTH|AVG|BIT_AND|BIT_OR|BIT_XOR|COUNT|GROUP_CONCAT|MAX|MIN|STDDEV_POP|STDDEV_SAMP|STDDEV|STD|SUM|VAR_POP|VAR_SAMP|VARIANCE|BENCHMARK|COERCIBILITY|COLLATION|CONNECTION_ID|FOUND_ROWS|LAST_INSERT_ID|ROW_COUNT|SESSION_USER|SYSTEM_USER|USER|VERSION|"CURRENT_USER"|"DATABASE"|"SCHEMA"|"CHARSET"ExtractValue|BIT_COUNT|GET_LOCK|INET_ATON|INET_NTOA|IS_FREE_LOCK|IS_USED_LOCK|MASTER_POS_WAIT|NAME_CONST|RELEASE_LOCK|SLEEP|UpdateXML|UUID|Area|AsBinary|AsText|AsWKB|AsWKT|Boundary|Buffer|Centroid|Contains|ConvexHull|Crosses|Difference|Dimension|Disjoint|Distance|EndPoint|Envelope|Equals|ExteriorRing|GLength|GeomCollFromText|GeomCollFromWKB|GeomFromText|GeomFromWKB|GeometryCollectionFromText|GeometryCollectionFromWKB|GeometryFromText|GeometryFromWKB|GeometryN|GeometryType|InteriorRingN|Intersection|Intersects|IsClosed|IsEmpty|IsRing|IsSimple|LineFromText|LineFromWKB|LineStringFromText|LineStringFromWKB|MBRContains|MBRDisjoint|MBREqual|MBRIntersects|MBROverlaps|MBRTouches|MBRWithin|MLineFromText|MLineFromWKB|MPointFromText|MPointFromWKB|MPolyFromText|MPolyFromWKB|MultiLineStringFromText|MultiLineStringFromWKB|MultiPointFromText|MultiPointFromWKB|MultiPolygonFromText|MultiPolygonFromWKB|NumGeometries|NumInteriorRings|NumPoints|Overlaps|PointFromText|PointFromWKB|PointN|PointOnSurface|PolyFromText|PolyFromWKB|PolygonFromText|PolygonFromWKB|Related|SRID|StartPoint|SymDifference|Touches|Union|Within|X|Y))(?!\\w)/g",
|
|
"style" : "ve-ce-mwSynHi-magicwords"
|
|
},
|
|
{
|
|
"match" : "/[\\W|^]((BIGINT|BIT|BLOB|BOOLEAN|BOOL|CHARACTERVARYING|CHARVARYING|DATETIME|DECIMAL|DEC|DOUBLEPRECISION|DOUBLE|ENUM|FIXED|FLOAT|GEOMETRYCOLLECTION|GEOMETRY|INTEGER|INT|LINESTRING|LONGBLOB|LONGTEXT|MEDIUMBLOB|MEDIUMINT|MEDIUMTEXT|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|NATIONALCHARACTER|NATIONALCHARACTERVARYING|NATIONALCHARVARYING|NATIONALVARCHAR|NCHARVARCHAR|NCHAR|NUMERIC|POINT|POLYGON|REAL|SERIAL|SMALLINT|TEXT|TIMESTAMP|TINYBLOB|TINYINT|TINYTEXT|VARBINARY|VARCHARACTER|VARCHAR))(?!\\w)/g",
|
|
"style" : "ve-ce-mwSynHi-typeconstructor"
|
|
},
|
|
{
|
|
"match" : "/[\\W|^]((AUTO_INCREMENT|AVG_ROW_LENGTH|BOTH|CHECKSUM|CONNECTION|DATADIRECTORY|DEFAULTNULL|DELAY_KEY_WRITE|FULLTEXT|INDEXDIRECTORY|INSERT_METHOD|LEADING|MAX_ROWS|MIN_ROWS|NOTNULL|PACK_KEYS|ROW_FORMAT|SERIALDEFAULTVALUE|SIGNED|SPATIAL|TRAILING|UNIQUE|UNSIGNED|ZEROFILL|AND|BETWEEN|CHARACTERSET|COLLATE|DIV|ISNOTNULL|ISNOT|ISNULL|IS|LIKE|NOT|OFFSET|OR|REGEXP|RLIKE|SOUNDSLIKE|XOR|INTERVAL|DAY_HOUR|DAY_MICROSECOND|DAY_MINUTE|DAY_SECOND|HOUR_MICROSECOND|HOUR_MINUTE|HOUR_SECOND|MINUTE_MICROSECOND|MINUTE_SECOND|SECOND_MICROSECOND|YEAR_MONTH))(?!\\w)/g",
|
|
"style" : "ve-ce-mwSynHi-reserved"
|
|
},
|
|
{
|
|
"match" : "/(\\\\)/g",
|
|
"style" : "ve-ce-mwSynHi-escape"
|
|
},
|
|
{
|
|
"match" : "/(\\(|\\)|\\[|\\]|\\{|\\})/g",
|
|
"style" : "ve-ce-mwSynHi-bracket"
|
|
},
|
|
{
|
|
"match" : "/([`'\\\"][^]*?[`'\\\"])/g",
|
|
"style" : "ve-ce-mwSynHi-string"
|
|
},
|
|
{
|
|
"match" : "/\\W([0-9]+)(?!\\w)/g",
|
|
"style" : "ve-ce-mwSynHi-number"
|
|
},
|
|
{
|
|
"match" : "/([--\\s|#].*$)/gm",
|
|
"style" : "ve-ce-mwSynHi-comment-single"
|
|
},
|
|
{
|
|
"match" : "/(\\/\\*[^]*?\\*\\/)/g",
|
|
"style" : "ve-ce-mwSynHi-comment-multi"
|
|
}
|
|
],
|
|
"validator" :
|
|
[
|
|
]
|
|
} |