UNPKG
blear.ui.code-highlight
Version:
latest (2.3.2)
2.3.2
2.3.1
2.3.0
2.2.1
2.2.0
2.1.4
2.1.3
2.1.2
2.1.1
代码高亮,基于 prism@1.17.1
github.com/blearjs/blear.ui.code-highlight
blearjs/blear.ui.code-highlight
blear.ui.code-highlight
/
src
/
prismjs
/
components
/
prism-gcode.js
16 lines
(15 loc)
•
275 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Prism
.
languages
.
gcode
= {
'comment'
:
/;.*|\B\(.*?\)\B/
,
'string'
: {
pattern
:
/"(?:""|[^"])*"/
,
greedy
:
true
},
'keyword'
:
/\b[GM]\d+(?:\.\d+)?\b/
,
'property'
:
/\b[A-Z]/
,
'checksum'
: {
pattern
:
/\*\d+/
,
alias
:
'punctuation'
},
// T0:0:0
'punctuation'
:
/:/
};