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

Commit 62eecca

Browse files
author
wjt
committed
1 parent 1a0e882 commit 62eecca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sublime_evernote.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ def to_markdown_html(self):
4343

4444
sels = self.view.sel()
4545
contents = ''
46-
if not sels:
47-
region = sublime.Region(0L, self.view.size())
48-
contents = self.view.substr(region)
49-
else:
46+
if sels:
5047
for sel in sels: contents += self.view.substr(sel) + '\n\n'
5148

49+
if not contents.strip():
50+
region = sublime.Region(0L, self.view.size())
51+
contents = self.view.substr(region)
52+
5253
markdown_html = markdown2.markdown(contents, extras=['footnotes', 'fenced-code-blocks', 'cuddled-lists', 'code-friendly', 'metadata'])
5354
return markdown_html
5455

0 commit comments

Comments
 (0)