- // Trim empty spaces at beginning of element contents except <pre>.\r
- if ( !currentNode._.hasInlineStarted && !inPre )\r
+ // Trim empty spaces at beginning of text contents except <pre>.\r
+ if ( ( !currentNode._.hasInlineStarted || pendingBRs.length ) && !inPre )\r