She was in a perilous position. So perilous that if her memory and her knowledge of the situation which it brought with it had come to her even as she put the key into the door, she would have obeyed her impulseto turn and flee.
What does the part "which it brought with it" refer to? I don't understand it.
No. What do you think it refers to?
Well, it's more than a bit confused but I would say it means that her memory brought her knowledge of the situation with it. Which, to me, sounds like an elaborate and confusing way to say that she remembered the situation. Where does this come from?
It comes from a book entitled The Witches but I have an electronic version of it and very often the punctuation is very bad. Maybe in the paper edition it would look different.