Skip to content

Commit

Permalink
fixed $ issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Afzal7 committed Apr 21, 2018
1 parent 793180a commit 2ff6381
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion syncrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def run(self, edit, **args):

def on_done(self, file_name):
self.window.status_message('Syncrow - Waiting for the magic to happen...')
snippet = {'name': file_name, 'content': self.selected_text}
snippet = {'name': file_name, 'content': self.sanitize_text(self.selected_text)}
self.create_snippet(snippet, True)

def sync(self):
Expand Down Expand Up @@ -126,6 +126,9 @@ def upload_snippet(self, snippet):
else:
self.window.status_message('Syncrow - Snippet created but not synced! Check your syncrow secret key.')

def sanitize_text(self, text):
return text.replace('$','\$')

def get_snippet_list(self):
snippet_list = []
for file in os.listdir(sublime.packages_path()):
Expand Down

0 comments on commit 2ff6381

Please sign in to comment.