Skip to content

Commit 7a44228

Browse files
fix rich output html image src
1 parent 7ea49b1 commit 7a44228

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/geophires_x/GeoPHIRESUtils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ def InsertImagesIntoHTML(html_path: str, short_names: set, full_names: set) -> N
100100
# build the string to be inserted first
101101
insert_string = ''
102102
for _ in range(len(full_names)):
103-
name_to_use = short_names.pop()
104-
insert_string = insert_string + f'<img src="{name_to_use}" alt="{name_to_use}">\n<br>'
103+
full_name = full_names.pop()
104+
name_to_use = full_name.name.replace('_', ' ').replace('.png', '')
105+
insert_string = insert_string + f'<img src="{full_name.name}" alt="{name_to_use}">\n<br>'
105106

106107
match_string = '</body>'
107108
with open(html_path, 'r+', encoding='UTF-8') as html_file:

0 commit comments

Comments
 (0)