Update CodeMirror to version 5.49.0 (#8381)
* Update CodeMirror to version 5.49.0 * Update CodeMirror versions in librejs and VERSIONS
This commit is contained in:
parent
6fa14ac3c8
commit
1e9b330525
352 changed files with 14625 additions and 2451 deletions
|
@ -1,5 +1,5 @@
|
|||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
(function() {
|
||||
var mode = CodeMirror.getMode({indentUnit: 2}, "jsx")
|
||||
|
@ -11,6 +11,9 @@
|
|||
MT("openclose",
|
||||
"([bracket&tag <][tag foo][bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
|
||||
|
||||
MT("openclosefragment",
|
||||
"([bracket&tag <><][tag foo][bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag ></>][operator ++])")
|
||||
|
||||
MT("attr",
|
||||
"([bracket&tag <][tag foo] [attribute abc]=[string 'value'][bracket&tag >]hello [atom &][bracket&tag </][tag foo][bracket&tag >][operator ++])")
|
||||
|
||||
|
@ -33,6 +36,9 @@
|
|||
MT("preserve_js_context",
|
||||
"[variable x] [operator =] [string-2 `quasi${][bracket&tag <][tag foo][bracket&tag />][string-2 }quoted`]")
|
||||
|
||||
MT("string_interpolation",
|
||||
"[variable x] [operator =] [string-2 `quasi<code>${] [number 10] [string-2 }</code>`]")
|
||||
|
||||
MT("line_comment",
|
||||
"([bracket&tag <][tag foo] [comment // hello]",
|
||||
" [bracket&tag ></][tag foo][bracket&tag >][operator ++])")
|
||||
|
@ -66,4 +72,20 @@
|
|||
|
||||
MT("tag_attribute",
|
||||
"([bracket&tag <][tag foo] [attribute bar]=[bracket&tag <][tag foo][bracket&tag />/>][operator ++])")
|
||||
|
||||
var ts_mode = CodeMirror.getMode({indentUnit: 2}, "text/typescript-jsx")
|
||||
function TS(name) { test.mode(name, ts_mode, Array.prototype.slice.call(arguments, 1)) }
|
||||
|
||||
TS("tsx_react_integration",
|
||||
"[keyword interface] [def Props] {",
|
||||
" [property foo]: [type string];",
|
||||
"}",
|
||||
"[keyword class] [def MyComponent] [keyword extends] [type React].[type Component] [operator <] [type Props], [type any] [operator >] {",
|
||||
" [property render]() {",
|
||||
" [keyword return] [bracket&tag <][tag span][bracket&tag >]{[keyword this].[property props].[property foo]}[bracket&tag </][tag span][bracket&tag >]",
|
||||
" }",
|
||||
"}",
|
||||
"[bracket&tag <][tag MyComponent] [attribute foo]=[string \"bar\"] [bracket&tag />]; [comment //ok]",
|
||||
"[bracket&tag <][tag MyComponent] [attribute foo]={[number 0]} [bracket&tag />]; [comment //error]")
|
||||
|
||||
})()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue