(mobj)
| 133 | substr = named_re.sub(r"<\1>", substr) # get rid of definition templates |
| 134 | |
| 135 | def listrepl(mobj): |
| 136 | thelist = conv(mobj.group(1).replace(r'\,', '@comma@')) |
| 137 | if template_name_re.match(thelist): |
| 138 | return f"<{thelist}>" |
| 139 | name = None |
| 140 | for key in lnames.keys(): # see if list is already in dictionary |
| 141 | if lnames[key] == thelist: |
| 142 | name = key |
| 143 | if name is None: # this list is not in the dictionary yet |
| 144 | name = unique_key(lnames) |
| 145 | lnames[name] = thelist |
| 146 | return f"<{name}>" |
| 147 | |
| 148 | # convert all lists to named templates |
| 149 | # new names are constructed as needed |
nothing calls this directly
no test coverage detected
searching dependent graphs…