'Resets all state variables so that we can start with a new text.'

def reset(self):

    self.htmlStash.reset()
    self.references.clear()
    for extension in self.registeredExtensions:
        extension.reset()
