function collapseWhitespaceSmart(str, prevTag, nextTag) {
// array of tags that will maintain a single space outside of them
- var tags = ['a', 'b', 'big', 'button', 'em', 'font','i', 'img', 'mark', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tt', 'u'];
+ var tags = ['a', 'b', 'big', 'button', 'code', 'em', 'font','i', 'img', 'kbd', 'mark', 'q', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tt', 'u'];
if (prevTag && (prevTag.substr(0,1) !== '/'
|| ( prevTag.substr(0,1) === '/' && tags.indexOf(prevTag.substr(1)) === -1))) {