Commit b14b2137 authored by Aluriak's avatar Aluriak

more stripping in properties

parent a039059f
......@@ -72,7 +72,7 @@ def visual_config_from_atoms(atoms:dict, base_atoms:dict,
def get_uid_from_atom(atom:str or tuple):
if isinstance(atom, str):
return atom
return atom.strip('"')
elif isinstance(atom, tuple):
if len(atom) == 2: # a regular atom
if len(atom[1]) == 0:
......@@ -138,11 +138,11 @@ def visual_config_from_atoms(atoms:dict, base_atoms:dict,
if len(colored) == 2: # node
node, color = colored
node = get_uid_from_atom(node)
properties[node]['fillcolor'].add(color)
properties[node]['fillcolor'].add(color.strip('"'))
elif len(colored) == 3: # edge
src, trg, color = colored
src, trg = map(get_uid_from_atom, (src, trg))
properties[src, trg]['color'].add(color) # fillcolor do not exists for edges
properties[src, trg]['color'].add(color.strip('"')) # fillcolor do not exists for edges
for shaped in get_atoms_of_predicate('shape'):
if len(shaped) == 2: # node
node, shape = shaped
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment