Skip to content

Commit

Permalink
Make template separator character user-configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
formatc1702 committed Oct 16, 2021
1 parent 08b5124 commit 45bcc1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/wireviz/DataClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Options:
bgcolor_bundle: Optional[Color] = None
color_mode: ColorMode = "SHORT"
mini_bom_mode: bool = True
template_separator: str = "."

def __post_init__(self):
if not self.bgcolor_node:
Expand Down
2 changes: 1 addition & 1 deletion src/wireviz/wireviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def parse(

# go through connection sets, generate and connect components ==============

template_separator_char = "." # TODO: make user-configurable (in case user wants to use `.` as part of their template/component names)
template_separator_char = harness.options.template_separator

def resolve_designator(inp, separator):
if separator in inp: # generate a new instance of an item
Expand Down

0 comments on commit 45bcc1d

Please sign in to comment.