Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

Commit

Permalink
#7
Browse files Browse the repository at this point in the history
  • Loading branch information
wjt committed Nov 7, 2014
1 parent 1a0e882 commit 62eecca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sublime_evernote.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ def to_markdown_html(self):

sels = self.view.sel()
contents = ''
if not sels:
region = sublime.Region(0L, self.view.size())
contents = self.view.substr(region)
else:
if sels:
for sel in sels: contents += self.view.substr(sel) + '\n\n'

if not contents.strip():
region = sublime.Region(0L, self.view.size())
contents = self.view.substr(region)

markdown_html = markdown2.markdown(contents, extras=['footnotes', 'fenced-code-blocks', 'cuddled-lists', 'code-friendly', 'metadata'])
return markdown_html

Expand Down

0 comments on commit 62eecca

Please sign in to comment.