Skip to content

Commit

Permalink
Use https links in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
lockie committed Apr 7, 2020
1 parent 215bf50 commit 207ee12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions martor/static/martor/js/martor.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,13 @@
var originalRange = editor.getSelectionRange();
if (editor.selection.isEmpty()) {
var curpos = editor.getCursorPosition();
editor.session.insert(curpos, ' [](http://) ');
editor.session.insert(curpos, ' [](https://) ');
editor.focus();
editor.selection.moveTo(curpos.row, curpos.column+2);
}else {
var range = editor.getSelectionRange();
var text = editor.session.getTextRange(range);
editor.session.replace(range, '['+text+'](http://) ');
editor.session.replace(range, '['+text+'](https://) ');
editor.focus();
editor.selection.moveTo(
originalRange.end.row,
Expand All @@ -473,13 +473,13 @@
if (typeof(imageData) === 'undefined') {
if (editor.selection.isEmpty()) {
var curpos = editor.getCursorPosition();
editor.session.insert(curpos, ' ![](http://) ');
editor.session.insert(curpos, ' ![](https://) ');
editor.focus();
editor.selection.moveTo(curpos.row, curpos.column+3);
}else {
var range = editor.getSelectionRange();
var text = editor.session.getTextRange(range);
editor.session.replace(range, '!['+text+'](http://) ');
editor.session.replace(range, '!['+text+'](https://) ');
editor.focus();
editor.selection.moveTo(
originalRange.end.row,
Expand Down
Loading

0 comments on commit 207ee12

Please sign in to comment.