MCPcopy
hub / github.com/DHTMLX/gantt / charType

Function charType

samples/common/codehighlight/codemirror.js:375–383  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

373 // Character types for codepoints 0x600 to 0x6f9
374 var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
375 function charType(code) {
376 if (code <= 0xf7) { return lowTypes.charAt(code) }
377 else if (0x590 <= code && code <= 0x5f4) { return "R" }
378 else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }
379 else if (0x6ee <= code && code <= 0x8ac) { return "r" }
380 else if (0x2000 <= code && code <= 0x200b) { return "w" }
381 else if (code == 0x200c) { return "b" }
382 else { return "L" }
383 }
384
385 var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
386 var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;

Callers 1

codemirror.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected