forked from weseek/growi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into mikan/auth
- Loading branch information
Showing
56 changed files
with
731 additions
and
541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
packages/app/src/client/util/codemirror/drawio-fold.ext.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* eslint-disable */ | ||
|
||
import mdu from '../../../components/PageEditor/MarkdownDrawioUtil.js'; | ||
|
||
(function(mod) { | ||
mod(require("codemirror")); | ||
})(function(CodeMirror) { | ||
"use strict" | ||
|
||
CodeMirror.registerGlobalHelper('fold', 'drawio', function (mode, cm) { | ||
return true; | ||
}, function(cm, start) { | ||
function isBeginningOfDrawio(lineNo) { | ||
let line = cm.getLine(lineNo); | ||
let match = mdu.lineBeginPartOfDrawioRE.exec(line); | ||
if (match) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
function isEndOfDrawio(lineNo) { | ||
let line = cm.getLine(lineNo); | ||
let match = mdu.lineEndPartOfDrawioRE.exec(line); | ||
if (match) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
let drawio = isBeginningOfDrawio(start.line); | ||
if (drawio === false) { return; } | ||
|
||
let lastLine = cm.lastLine(); | ||
let end = start.line; | ||
while(end < lastLine) { | ||
end += 1; | ||
if (isEndOfDrawio(end)) { | ||
break; | ||
} | ||
} | ||
|
||
return { | ||
from: CodeMirror.Pos(start.line, cm.getLine(start.line).length), | ||
to: CodeMirror.Pos(end, cm.getLine(end).length) | ||
}; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/app/src/components/PageEditor/MarkdownTableInterceptor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.