From f424ea541e810ea36ed9b0ce670845e897850c8f Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Sun, 28 Mar 2021 13:20:06 +0200 Subject: [PATCH] Allow line breaks in generic metadata --- src/wireviz/wv_html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wireviz/wv_html.py b/src/wireviz/wv_html.py index 25ec411..77da987 100644 --- a/src/wireviz/wv_html.py +++ b/src/wireviz/wv_html.py @@ -61,7 +61,7 @@ def generate_html_output(filename: Union[str, Path], bom_list: List[List[str]], # insert generator html = html.replace('', f'{APP_NAME} {__version__} - {APP_URL}') - + # insert other metadata if metadata: @@ -74,13 +74,13 @@ def generate_html_output(filename: Union[str, Path], bom_list: List[List[str]], # fill out other generic metadata for item, contents in metadata.items(): if isinstance(contents, (str, int, float)): - html = html.replace(f'', contents) + html = html.replace(f'', html_line_breaks(contents)) elif isinstance(contents, Dict): # useful for authors, revisions for index, (category, entry) in enumerate(contents.items()): if isinstance(entry, Dict): html = html.replace(f'', str(category)) for entry_key, entry_value in entry.items(): - html = html.replace(f'', str(entry_value)) + html = html.replace(f'', html_line_breaks(str(entry_value))) with open(f'{filename}.html','w') as file: