mirror of
https://github.com/documize/community.git
synced 2025-07-29 18:19:44 +02:00
Update CodeMirror dep to v5.42.2
Affects Code and Markdown section types
This commit is contained in:
parent
c706edec47
commit
479a61a3ef
347 changed files with 21845 additions and 20770 deletions
83
gui/public/codemirror/mode/soy/test.js
vendored
83
gui/public/codemirror/mode/soy/test.js
vendored
|
@ -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}, "soy");
|
||||
|
@ -8,7 +8,7 @@
|
|||
// Test of small keywords and words containing them.
|
||||
MT('keywords-test',
|
||||
'[keyword {] [keyword as] worrying [keyword and] notorious [keyword as]',
|
||||
' the Fandor-alias assassin, [keyword or]',
|
||||
' the Fandor[operator -]alias assassin, [keyword or]',
|
||||
' Corcand cannot fit [keyword in] [keyword }]');
|
||||
|
||||
MT('let-test',
|
||||
|
@ -20,18 +20,60 @@
|
|||
'[keyword {/template}]',
|
||||
'');
|
||||
|
||||
MT('function-test',
|
||||
'[keyword {] [callee&variable css]([string "MyClass"])[keyword }]',
|
||||
'[tag&bracket <][tag input] [attribute value]=[string "]' +
|
||||
'[keyword {] [callee&variable index]([variable-2&error $list])[keyword }]' +
|
||||
'[string "][tag&bracket />]');
|
||||
|
||||
MT('namespace-test',
|
||||
'[keyword {namespace] [variable namespace][keyword }]')
|
||||
|
||||
MT('namespace-with-attribute-test',
|
||||
'[keyword {namespace] [variable my.namespace.templates] ' +
|
||||
'[attribute requirecss]=[string "my.namespace"][keyword }]');
|
||||
|
||||
MT('operators-test',
|
||||
'[keyword {] [atom 1] [operator ==] [atom 1] [keyword }]',
|
||||
'[keyword {] [atom 1] [operator !=] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 2] [operator +] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 2] [operator -] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 2] [operator *] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 2] [operator /] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 2] [operator %] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 2] [operator <=] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 2] [operator >=] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 3] [operator >] [atom 2] [keyword }]',
|
||||
'[keyword {] [atom 2] [operator >] [atom 3] [keyword }]',
|
||||
'[keyword {] [variable-2&error $variable] [operator |] safeHtml [keyword }]')
|
||||
|
||||
MT('primitive-test',
|
||||
'[keyword {] [atom true] [keyword }]',
|
||||
'[keyword {] [atom false] [keyword }]',
|
||||
'[keyword {] truethy [keyword }]',
|
||||
'[keyword {] falsey [keyword }]',
|
||||
'[keyword {] [atom 42] [keyword }]',
|
||||
'[keyword {] [atom .42] [keyword }]',
|
||||
'[keyword {] [atom 0.42] [keyword }]',
|
||||
'[keyword {] [atom -0.42] [keyword }]',
|
||||
'[keyword {] [atom -.2] [keyword }]',
|
||||
'[keyword {] [atom 0x1F] [keyword }]',
|
||||
'[keyword {] [atom 0x1F00BBEA] [keyword }]');
|
||||
|
||||
MT('param-type-test',
|
||||
'[keyword {@param] [def a]: ' +
|
||||
'[variable-3 list]<[[[variable-3 a]: [variable-3 int], ' +
|
||||
'[variable-3 b]: [variable-3 map]<[variable-3 string], ' +
|
||||
'[variable-3 bool]>]]>][keyword }]');
|
||||
'[type list]<[[[type a]: [type int], ' +
|
||||
'[type b]: [type map]<[type string], ' +
|
||||
'[type bool]>]]>][keyword }]',
|
||||
'[keyword {@param] [def unknown]: [type ?][keyword }]',
|
||||
'[keyword {@param] [def list]: [type list]<[type ?]>[keyword }]');
|
||||
|
||||
MT('undefined-var',
|
||||
'[keyword {][variable-2&error $var]');
|
||||
|
||||
MT('param-scope-test',
|
||||
'[keyword {template] [def .a][keyword }]',
|
||||
' [keyword {@param] [def x]: [variable-3 string][keyword }]',
|
||||
' [keyword {@param] [def x]: [type string][keyword }]',
|
||||
' [keyword {][variable-2 $x][keyword }]',
|
||||
'[keyword {/template}]',
|
||||
'',
|
||||
|
@ -48,7 +90,7 @@
|
|||
|
||||
MT('defined-if-variable-test',
|
||||
'[keyword {template] [def .foo][keyword }]',
|
||||
' [keyword {@param?] [def showThing]: [variable-3 bool][keyword }]',
|
||||
' [keyword {@param?] [def showThing]: [type bool][keyword }]',
|
||||
' [keyword {if] [variable-2 $showThing][keyword }]',
|
||||
' Yo!',
|
||||
' [keyword {/if}]',
|
||||
|
@ -56,17 +98,15 @@
|
|||
'');
|
||||
|
||||
MT('template-calls-test',
|
||||
'[keyword {template] [def .foo][keyword }]',
|
||||
' Yo!',
|
||||
'[keyword {/template}]',
|
||||
'[keyword {call] [variable-2 .foo][keyword /}]',
|
||||
'[keyword {call] [variable foo][keyword /}]',
|
||||
'[keyword {call] [variable .bar][keyword /}]',
|
||||
'[keyword {call] [variable bar][keyword /}]',
|
||||
'[keyword {call] [variable foo][keyword }] [keyword {/call}]',
|
||||
'[keyword {call] [variable first1.second.third_3][keyword /}]',
|
||||
'[keyword {call] [variable first1.second.third_3] [keyword }] [keyword {/call}]',
|
||||
'');
|
||||
|
||||
MT('foreach-scope-test',
|
||||
'[keyword {@param] [def bar]: [variable-3 string][keyword }]',
|
||||
'[keyword {@param] [def bar]: [type string][keyword }]',
|
||||
'[keyword {foreach] [def $foo] [keyword in] [variable-2&error $foos][keyword }]',
|
||||
' [keyword {][variable-2 $foo][keyword }]',
|
||||
'[keyword {/foreach}]',
|
||||
|
@ -84,8 +124,8 @@
|
|||
MT('nested-kind-test',
|
||||
'[keyword {template] [def .foo] [attribute kind]=[string "html"][keyword }]',
|
||||
' [tag&bracket <][tag div][tag&bracket >]',
|
||||
' [keyword {call] [variable .bar][keyword }]',
|
||||
' [keyword {param] [attribute kind]=[string "js"][keyword }]',
|
||||
' [keyword {call] [variable-2 .bar][keyword }]',
|
||||
' [keyword {param] [property propertyName] [attribute kind]=[string "js"][keyword }]',
|
||||
' [keyword var] [def bar] [operator =] [number 5];',
|
||||
' [keyword {/param}]',
|
||||
' [keyword {/call}]',
|
||||
|
@ -94,14 +134,14 @@
|
|||
'');
|
||||
|
||||
MT('tag-starting-with-function-call-is-not-a-keyword',
|
||||
'[keyword {]index([variable-2&error $foo])[keyword }]',
|
||||
'[keyword {][callee&variable index]([variable-2&error $foo])[keyword }]',
|
||||
'[keyword {css] [string "some-class"][keyword }]',
|
||||
'[keyword {]css([string "some-class"])[keyword }]',
|
||||
'[keyword {][callee&variable css]([string "some-class"])[keyword }]',
|
||||
'');
|
||||
|
||||
MT('allow-missing-colon-in-@param',
|
||||
'[keyword {template] [def .foo][keyword }]',
|
||||
' [keyword {@param] [def showThing] [variable-3 bool][keyword }]',
|
||||
' [keyword {@param] [def showThing] [type bool][keyword }]',
|
||||
' [keyword {if] [variable-2 $showThing][keyword }]',
|
||||
' Yo!',
|
||||
' [keyword {/if}]',
|
||||
|
@ -111,4 +151,11 @@
|
|||
MT('single-quote-strings',
|
||||
'[keyword {][string "foo"] [string \'bar\'][keyword }]',
|
||||
'');
|
||||
|
||||
MT('literal-comments',
|
||||
'[keyword {literal}]/* comment */ // comment[keyword {/literal}]');
|
||||
|
||||
MT('highlight-command-at-eol',
|
||||
'[keyword {msg]',
|
||||
' [keyword }]');
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue