mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-09 09:22:38 +00:00
Update usage of trailing space to include special chars for spaces
This commit is contained in:
@@ -161,10 +161,17 @@ const CodeEditor = createClass({
|
|||||||
return `\u21A4 ${text} \u21A6`;
|
return `\u21A4 ${text} \u21A6`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
gutters : ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'],
|
gutters : ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'],
|
||||||
showTrailingSpace : true,
|
autoCloseTags : true,
|
||||||
autoCloseTags : true,
|
styleActiveLine : true,
|
||||||
styleActiveLine : true
|
showTrailingSpace : true,
|
||||||
|
specialChars : / /,
|
||||||
|
specialCharPlaceholder : function(char) {
|
||||||
|
const el = document.createElement('span');
|
||||||
|
el.className = 'cm-space';
|
||||||
|
el.innerHTML = ' ';
|
||||||
|
return el;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
closeTag.autoCloseCurlyBraces(CodeMirror, this.codeMirror);
|
closeTag.autoCloseCurlyBraces(CodeMirror, this.codeMirror);
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cm-trailingspace {
|
.cm-trailingspace {
|
||||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAQAgMAAABW5NbuAAAACVBMVEVHcEwAAAAAAAAWawmTAAAAA3RSTlMAPBJ6PMxpAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAFUlEQVQI12NgwACcCQysASAEZGAAACMuAX06aCQUAAAAAElFTkSuQmCC) repeat-x left;
|
.cm-space {
|
||||||
background-size: 7.16px 15px;
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAQAgMAAABW5NbuAAAACVBMVEVHcEwAAAAAAAAWawmTAAAAA3RSTlMAPBJ6PMxpAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAFUlEQVQI12NgwACcCQysASAEZGAAACMuAX06aCQUAAAAAElFTkSuQmCC) no-repeat right;
|
||||||
|
|
||||||
.cm-tab {
|
|
||||||
background: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user