Commits

Geoffrey Sneddon committed a6df969

Remove the begin-link and end-link comments, so running the spec-gen n + 1 times has the same affect as running it n times.

Comments (0)

Files changed (2)

specGen/processes/sub.py

 				else:
 					if node.getparent() is link_parent:
 						link.append(deepcopy(node))
-					to_remove.append(node)
+				to_remove.append(node)
 			elif isinstance(node, etree._Comment) and node.text.strip(utils.spaceCharacters) == "begin-link":
 				link_parent = node.getparent()
 				in_link = True
 				link.text = node.tail
 				node.tail = None
 				node.addnext(link)
+				to_remove.append(node)
 		for node in to_remove:
 			node.getparent().remove(node)