OK. Here's what I think is going on here.
(and please note that I am not an authority on the subject - it's just my feeling for the matter)
If we are quoting reported speach, i.e. a complete phrase.
He cast his eyes heavenwards and snarled "You're just not listening to what I say."
In this case 1st is correct.
That's a complete phrase (or what ever) and is therefore contained within the quotation marks.
Pelivic's "mashing" is not a complete phrase but is one word within the sentance. The sentance ends with a full stop - the fact that a word within quotation marks
just happens to be the last word is neither here nor there.
In this case 2nd is correct.
Hopefully someone who knows what they are talking about will be along in a minute to explain what I meant.
And to agree or disagree.
Edit: Oh bugger, I think that has just been said.
Why can't I
type think quicker?