mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
style: prettify code
This commit is contained in:
parent
aee49b2d32
commit
a54f55bbac
@ -11,11 +11,10 @@ import CodeMirror from "codemirror/lib/codemirror";
|
||||
|
||||
var Pos = CodeMirror.Pos;
|
||||
|
||||
CodeMirror.defineOption("autoCloseBrackets", false, function (
|
||||
cm,
|
||||
val,
|
||||
old
|
||||
) {
|
||||
CodeMirror.defineOption(
|
||||
"autoCloseBrackets",
|
||||
false,
|
||||
function (cm, val, old) {
|
||||
if (old && old != CodeMirror.Init) {
|
||||
cm.removeKeyMap(keyMap);
|
||||
cm.state.closeBrackets = null;
|
||||
@ -25,7 +24,8 @@ import CodeMirror from "codemirror/lib/codemirror";
|
||||
cm.state.closeBrackets = val;
|
||||
cm.addKeyMap(keyMap);
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
function getOption(conf, name) {
|
||||
if (name == "pairs" && typeof conf == "string") return conf;
|
||||
|
@ -200,7 +200,6 @@ export function formatDoc(content) {
|
||||
return doc;
|
||||
}
|
||||
|
||||
|
||||
export function fixCodeWhiteSpace(value = "pre") {
|
||||
const preDomList = document.getElementsByClassName("code__pre");
|
||||
if (preDomList.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user