To comma or not to comma. If you're writing a book, you're going to face this question maybe 100 times...if not more. With each line of dialogue you write comes an important question: am I supposed to end it with a comma or a period?
The End of the Sentence
Punctuating dialogue is one of the most confusing tasks you'll face as an author. You're already introducing quotation marks into the mix, which is extra punctuation, and you can't ignore all the normal rules of the game, either. So every time you write a new line, it's a new challenge.
"I read about that on the Internet," he said.
"I thought you weren't going to eat carbs anymore," she said.
When it's simple and straightforward, it's easy. You can just tack he said onto the end of everything and call it a day. Some authors say that this is the only way to end dialogue. I say that's boring. Also, not all dialogue is a simple statement. If you're doing your job as an author, it's going to get more complex than that. Sometimes, people don't just say something plainly. Sometimes there's an action to go with the dialogue. Sometimes there's a certain expression. Sometimes there's just more. So how do you write that dialogue? With emphasis on proper punctuation, of course.
"You never told me that before." The sadness in his eyes was clear.
"You said we were best friends." Tears gathered in her eyes when she whispered the words.
When dialogue is more than dialogue, split it into two separate sentences. End the dialogue the way you'd end any other sentence -- with a period -- and then start a new one. Run-on sentences are still run-on sentences, even when they include a line of dialogue.
Always treat dialogue like any regular sentence, and you won't go wrong. Dialogue can even be split up within the sentence, if it's written correctly.
"I don't think so," she leaned forward to whisper, "he told me he's the one who bought it!"
Remember that in the United States, the punctuation for the dialogue goes inside the quotation marks. In British English, the punctuation is outside the quotation marks. Place the quotes correctly but write sentences the same way, and ending dialogue won't be such a big question.