Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
f1c51bd4
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f1c51bd4
编写于
3月 26, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor: Update CodeMirror to 5.1
上级
705336f2
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
1224 addition
and
541 deletion
+1224
-541
editor/js/libs/codemirror/codemirror.css
editor/js/libs/codemirror/codemirror.css
+24
-10
editor/js/libs/codemirror/codemirror.js
editor/js/libs/codemirror/codemirror.js
+1185
-529
editor/js/libs/codemirror/mode/javascript.js
editor/js/libs/codemirror/mode/javascript.js
+13
-2
editor/js/libs/codemirror/theme/monokai.css
editor/js/libs/codemirror/theme/monokai.css
+2
-0
未找到文件。
editor/js/libs/codemirror/codemirror.css
浏览文件 @
f1c51bd4
...
...
@@ -4,6 +4,7 @@
/* Set height, width, borders, and global font properties here */
font-family
:
monospace
;
height
:
300px
;
color
:
black
;
}
/* PADDING */
...
...
@@ -32,8 +33,7 @@
min-width
:
20px
;
text-align
:
right
;
color
:
#999
;
-moz-box-sizing
:
content-box
;
box-sizing
:
content-box
;
white-space
:
nowrap
;
}
.CodeMirror-guttermarker
{
color
:
black
;
}
...
...
@@ -139,11 +139,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
the editor. You probably shouldn't touch them. */
.CodeMirror
{
line-height
:
1
;
position
:
relative
;
overflow
:
hidden
;
background
:
white
;
color
:
black
;
}
.CodeMirror-scroll
{
...
...
@@ -155,14 +153,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
height
:
100%
;
outline
:
none
;
/* Prevent dragging from highlighting the element */
position
:
relative
;
-moz-box-sizing
:
content-box
;
box-sizing
:
content-box
;
}
.CodeMirror-sizer
{
position
:
relative
;
border-right
:
30px
solid
transparent
;
-moz-box-sizing
:
content-box
;
box-sizing
:
content-box
;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
...
...
@@ -197,8 +191,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-gutter
{
white-space
:
normal
;
height
:
100%
;
-moz-box-sizing
:
content-box
;
box-sizing
:
content-box
;
display
:
inline-block
;
margin-bottom
:
-30px
;
/* Hack to make IE7 behave */
...
...
@@ -215,6 +207,11 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
cursor
:
default
;
z-index
:
4
;
}
.CodeMirror-gutter-wrapper
{
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
user-select
:
none
;
}
.CodeMirror-lines
{
cursor
:
text
;
...
...
@@ -235,6 +232,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
z-index
:
2
;
position
:
relative
;
overflow
:
visible
;
-webkit-tap-highlight-color
:
transparent
;
}
.CodeMirror-wrap
pre
{
word-wrap
:
break-word
;
...
...
@@ -256,6 +254,20 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-widget
{}
.CodeMirror-code
{
outline
:
none
;
}
/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll
,
.CodeMirror-sizer
,
.CodeMirror-gutter
,
.CodeMirror-gutters
,
.CodeMirror-linenumber
{
-moz-box-sizing
:
content-box
;
box-sizing
:
content-box
;
}
.CodeMirror-measure
{
position
:
absolute
;
width
:
100%
;
...
...
@@ -283,6 +295,8 @@ div.CodeMirror-cursors {
.CodeMirror-selected
{
background
:
#d9d9d9
;
}
.CodeMirror-focused
.CodeMirror-selected
{
background
:
#d7d4f0
;
}
.CodeMirror-crosshair
{
cursor
:
crosshair
;
}
.CodeMirror
::selection
{
background
:
#d7d4f0
;
}
.CodeMirror
::-moz-selection
{
background
:
#d7d4f0
;
}
.cm-searching
{
background
:
#ffa
;
...
...
editor/js/libs/codemirror/codemirror.js
浏览文件 @
f1c51bd4
此差异已折叠。
点击以展开。
editor/js/libs/codemirror/mode/javascript.js
浏览文件 @
f1c51bd4
...
...
@@ -118,7 +118,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
}
else
if
(
state
.
lastType
==
"
operator
"
||
state
.
lastType
==
"
keyword c
"
||
state
.
lastType
==
"
sof
"
||
/^
[\[
{}
\(
,;:
]
$/
.
test
(
state
.
lastType
))
{
readRegexp
(
stream
);
stream
.
eatWhile
(
/
[
gimy
]
/
);
// 'y' is "sticky" option in Mozilla
stream
.
match
(
/^
\b(([
gimyu
])(?![
gimyu
]
*
\2))
+
\b
/
);
return
ret
(
"
regexp
"
,
"
string-2
"
);
}
else
{
stream
.
eatWhile
(
isOperatorChar
);
...
...
@@ -549,6 +549,10 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
}
function
classBody
(
type
,
value
)
{
if
(
type
==
"
variable
"
||
cx
.
style
==
"
keyword
"
)
{
if
(
value
==
"
static
"
)
{
cx
.
marked
=
"
keyword
"
;
return
cont
(
classBody
);
}
cx
.
marked
=
"
property
"
;
if
(
value
==
"
get
"
||
value
==
"
set
"
)
return
cont
(
classGetterSetter
,
functiondef
,
classBody
);
return
cont
(
functiondef
,
classBody
);
...
...
@@ -600,6 +604,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if
(
type
==
"
if
"
)
return
cont
(
expression
,
comprehension
);
}
function
isContinuedStatement
(
state
,
textAfter
)
{
return
state
.
lastType
==
"
operator
"
||
state
.
lastType
==
"
,
"
||
isOperatorChar
.
test
(
textAfter
.
charAt
(
0
))
||
/
[
,.
]
/
.
test
(
textAfter
.
charAt
(
0
));
}
// Interface
return
{
...
...
@@ -651,7 +661,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
else
if
(
type
==
"
form
"
&&
firstChar
==
"
{
"
)
return
lexical
.
indented
;
else
if
(
type
==
"
form
"
)
return
lexical
.
indented
+
indentUnit
;
else
if
(
type
==
"
stat
"
)
return
lexical
.
indented
+
(
state
.
lastType
==
"
operator
"
||
state
.
lastType
==
"
,
"
?
statementIndent
||
indentUnit
:
0
);
return
lexical
.
indented
+
(
isContinuedStatement
(
state
,
textAfter
)
?
statementIndent
||
indentUnit
:
0
);
else
if
(
lexical
.
info
==
"
switch
"
&&
!
closing
&&
parserConfig
.
doubleIndentSwitch
!=
false
)
return
lexical
.
indented
+
(
/^
(?:
case|default
)\b
/
.
test
(
textAfter
)
?
indentUnit
:
2
*
indentUnit
);
else
if
(
lexical
.
align
)
return
lexical
.
column
+
(
closing
?
0
:
1
);
...
...
@@ -663,6 +673,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
blockCommentEnd
:
jsonMode
?
null
:
"
*/
"
,
lineComment
:
jsonMode
?
null
:
"
//
"
,
fold
:
"
brace
"
,
closeBrackets
:
"
()[]{}''
\"\"
``
"
,
helperType
:
jsonMode
?
"
json
"
:
"
javascript
"
,
jsonldMode
:
jsonldMode
,
...
...
editor/js/libs/codemirror/theme/monokai.css
浏览文件 @
f1c51bd4
...
...
@@ -2,6 +2,8 @@
.cm-s-monokai.CodeMirror
{
background
:
#272822
;
color
:
#f8f8f2
;}
.cm-s-monokai
div
.CodeMirror-selected
{
background
:
#49483E
!important
;}
.cm-s-monokai.CodeMirror
::selection
{
background
:
rgba
(
73
,
72
,
62
,
.99
);
}
.cm-s-monokai.CodeMirror
::-moz-selection
{
background
:
rgba
(
73
,
72
,
62
,
.99
);
}
.cm-s-monokai
.CodeMirror-gutters
{
background
:
#272822
;
border-right
:
0px
;}
.cm-s-monokai
.CodeMirror-guttermarker
{
color
:
white
;
}
.cm-s-monokai
.CodeMirror-guttermarker-subtle
{
color
:
#d0d0d0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录