Skip to content

Commit 1ea2461

Browse files
committed
Fix #92
Always return forward slashes regardless of OS
1 parent ae7009d commit 1ea2461

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jekyll.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,8 +1200,9 @@ def run(self, edit, **args):
12001200
uploads_path = get_setting(self.view, 'jekyll_uploads_path')
12011201
uploads_baseurl = get_setting(self.view, 'jekyll_uploads_baseurl')
12021202
relative_path = os.path.relpath(args["path"], os.path.dirname(uploads_path))
1203+
relative_path = relative_path.replace(os.sep, '/')
12031204

1204-
# check if image
1205+
# build image URL
12051206
link_str = "{0}[{1}]({2}/{3})".format(
12061207
'!' if imghdr.what(args["path"]) is not None else '',
12071208
'${1:' + args["name"] + '}', uploads_baseurl, relative_path

0 commit comments

Comments
 (0)