You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When in edit mode, if you attempt to insert current date (ctrl + shift + 1), if the letterCount of the date string is and odd number the entire interface freezes. This is related to line 127 of the markdown-actions.js file, which divides the letterCount by 2 to place the cursor in the middle of the text string.
I believe the solution is to change line 127 from: this.elem.setCursor({line: cursor.line, ch: cursor.ch - (letterCount / 2)}) to: this.elem.setCursor({line: cursor.line, ch: cursor.ch - Math.floor(letterCount / 2)}); This will account for odd length inputs.
But from a user perspective adding the cursor to the center of an inserted date is odd behavior, so after line 115 md = moment(new Date()).format("D MMMM YYYY") adding text = true; will cause the cursor to be placed at the end of the inserted date.
https://en.ghost.org/forum/using-ghost/37-insert-current-date-shortcut-bug
The text was updated successfully, but these errors were encountered: