This may be a YART. If it is point me in the right direction and I'll look it up. I know that when you have a sentence that end in quotation marks the final punctuation must be before the final quotation mark...

Mary saw a spider and yelled, "eeek, why is that spider out of the house?"

But what are the rules when the quotation marks are used to stress a word or expression. Is the punctuation in, or out?

Mary knew she had no chance of dating the handsome Emelio because her friends said he was a little "light in the loafers".

or
...said he was a little "light in the loafers."