0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 01:02:47 +00:00

circleCI fix

This commit is contained in:
Gazook89
2021-08-13 08:31:41 -05:00
parent 727a58f56d
commit 8c03b453b2

View File

@@ -104,7 +104,7 @@ const CodeEditor = createClass({
makeLink : function() {
const selection = this.codeMirror.getSelection(), t = selection.slice(0, 1) === '[' && selection.slice(-3) === ']()';
this.codeMirror.replaceSelection(t ? selection.slice(1, -3) : `[${selection}]()`);
if ((selection.slice(0, 1) !== '[' || selection.slice(-3) !== ']()') || selection.length === 0){
if((selection.slice(0, 1) !== '[' || selection.slice(-3) !== ']()') || selection.length === 0){
const cursor = this.codeMirror.getCursor();
console.log('hello');
this.codeMirror.setCursor({ line: cursor.line, ch: cursor.ch - 1 });