|
8 | 8 | from wireviz.wv_helper import awg_equiv, mm2_equiv, tuplelist2tsv, \
|
9 | 9 | nested_html_table, flatten2d, index_if_list, html_line_breaks, \
|
10 | 10 | clean_whitespace, open_file_read, open_file_write, html_colorbar, \
|
11 |
| - html_image, html_caption, manufacturer_info_field, component_table_entry |
| 11 | + html_image, html_caption, manufacturer_info_field, component_table_entry, remove_links |
12 | 12 | from collections import Counter
|
13 | 13 | from typing import List, Union
|
14 | 14 | from pathlib import Path
|
@@ -92,8 +92,8 @@ def create_graph(self) -> Graph:
|
92 | 92 |
|
93 | 93 | html = []
|
94 | 94 |
|
95 |
| - rows = [[connector.name if connector.show_name else None], |
96 |
| - [f'P/N: {connector.pn}' if connector.pn else None, |
| 95 | + rows = [[remove_links(connector.name) if connector.show_name else None], |
| 96 | + [f'P/N: {remove_links(connector.pn)}' if connector.pn else None, |
97 | 97 | html_line_breaks(manufacturer_info_field(connector.manufacturer, connector.mpn))],
|
98 | 98 | [html_line_breaks(connector.type),
|
99 | 99 | html_line_breaks(connector.subtype),
|
@@ -162,8 +162,8 @@ def create_graph(self) -> Graph:
|
162 | 162 | elif cable.gauge_unit.upper() == 'AWG':
|
163 | 163 | awg_fmt = f' ({mm2_equiv(cable.gauge)} mm\u00B2)'
|
164 | 164 |
|
165 |
| - rows = [[cable.name if cable.show_name else None], |
166 |
| - [f'P/N: {cable.pn}' if (cable.pn and not isinstance(cable.pn, list)) else None, |
| 165 | + rows = [[remove_links(cable.name) if cable.show_name else None], |
| 166 | + [f'P/N: {remove_links(cable.pn)}' if (cable.pn and not isinstance(cable.pn, list)) else None, |
167 | 167 | html_line_breaks(manufacturer_info_field(
|
168 | 168 | cable.manufacturer if not isinstance(cable.manufacturer, list) else None,
|
169 | 169 | cable.mpn if not isinstance(cable.mpn, list) else None))],
|
@@ -205,7 +205,7 @@ def create_graph(self) -> Graph:
|
205 | 205 | # create a list of wire parameters
|
206 | 206 | wireidentification = []
|
207 | 207 | if isinstance(cable.pn, list):
|
208 |
| - wireidentification.append(f'P/N: {cable.pn[i - 1]}') |
| 208 | + wireidentification.append(f'P/N: {remove_links(cable.pn[i - 1])}') |
209 | 209 | manufacturer_info = manufacturer_info_field(
|
210 | 210 | cable.manufacturer[i - 1] if isinstance(cable.manufacturer, list) else None,
|
211 | 211 | cable.mpn[i - 1] if isinstance(cable.mpn, list) else None)
|
|
0 commit comments