diff --git a/src/wireviz/wireviz.py b/src/wireviz/wireviz.py index c60e5d9..5f06759 100755 --- a/src/wireviz/wireviz.py +++ b/src/wireviz/wireviz.py @@ -53,11 +53,10 @@ def parse(yaml_input: str, file_out: (str, Path) = None, return_types: (None, st if len(yaml_data[sec]) > 0: if ty == dict: for key, attribs in yaml_data[sec].items(): - # TODO: take care of this image thing # The Image dataclass might need to open an image file with a relative path. - # image = attribs.get('image') - # if isinstance(image, dict): - # image['gv_dir'] = Path(file_out if file_out else '').parent # Inject context + image = attribs.get('image') + if isinstance(image, dict): + image['gv_dir'] = Path(file_out if file_out else '').parent # Inject context # store component templates only; do not generate instances yet if sec == 'connectors':