My daughter asked me if this is correct or not - "We've first got to put the shelves together, then find a way to put them up," said Hermione, in a matter-of-fact tone of voice. - my answer was direct speech ending with comma doesn't look correct, but her answer sheet says this as correct answer. I can't explain her why, googling didn't work out. Please help.
The opposite is true — this article explains in more detail but generally you use a comma after direct speech. The only time this rule does not need to be followed is if the direct speech ends with a question mark or an exclamation point.