px4airframes markdown: always use '/' for path separation

Because it's an URL and os.path.join() will use '\' on windows.
This commit is contained in:
Beat Küng 2017-08-07 11:12:51 +02:00
parent d1e39ed9e0
commit 4ee9cb2e2f
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,8 @@ class MarkdownTablesOutput():
type_set = set()
if len(image_path) > 0 and image_path[-1] != '/':
image_path = image_path + '/'
for group in groups:
if group.GetClass() not in type_set:
@ -29,7 +31,7 @@ class MarkdownTablesOutput():
image_name = group.GetImageName()
result += '<div>\n'
if image_name != 'AirframeUnknown':
image_name = os.path.join(image_path, image_name)
image_name = image_path + image_name
result += '<img src="%s.svg" width="29%%" style="max-height: 180px;"/>\n' % (image_name)
# check if all outputs are equal for the group: if so, show them