mirror of
https://github.com/documize/community.git
synced 2025-08-04 13:05:23 +02:00
CodeMirror upgrade to 5.38.0
This commit is contained in:
parent
36be6243ad
commit
cfe30dcde5
52 changed files with 905 additions and 413 deletions
13
gui/public/codemirror/mode/swift/swift.js
vendored
13
gui/public/codemirror/mode/swift/swift.js
vendored
|
@ -138,8 +138,17 @@
|
|||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
stream.match(/^(?:[^*]|\*(?!\/))*/)
|
||||
if (stream.match("*/")) state.tokenize.pop()
|
||||
var ch
|
||||
while (true) {
|
||||
stream.match(/^[^/*]+/, true)
|
||||
ch = stream.next()
|
||||
if (!ch) break
|
||||
if (ch === "/" && stream.eat("*")) {
|
||||
state.tokenize.push(tokenComment)
|
||||
} else if (ch === "*" && stream.eat("/")) {
|
||||
state.tokenize.pop()
|
||||
}
|
||||
}
|
||||
return "comment"
|
||||
}
|
||||
|
||||
|
|
7
gui/public/codemirror/mode/swift/test.js
vendored
7
gui/public/codemirror/mode/swift/test.js
vendored
|
@ -142,6 +142,13 @@
|
|||
"[variable print][punctuation (][variable foo][property ._123][punctuation )]",
|
||||
"[variable print][punctuation (]")
|
||||
|
||||
MT("nested_comments",
|
||||
"[comment /*]",
|
||||
"[comment But wait /* this is a nested comment */ for real]",
|
||||
"[comment /**** let * me * show * you ****/]",
|
||||
"[comment ///// let / me / show / you /////]",
|
||||
"[comment */]");
|
||||
|
||||
// TODO: correctly identify when multiple variables are being declared
|
||||
// by use of a comma-separated list.
|
||||
// TODO: correctly identify when variables are being declared in a tuple.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue