- '/(^|\W|\s)\'"/' => '$1‘“',
- '/\'"(\s|\W|$)/' => '’”$1',
- '/(^|\W|\s)"\'/' => '$1“‘',
- '/"\'(\s|\W|$)/' => '”’$1',
+ // Note that in all cases, whitespace is the primary determining factor
+ // on which direction to curl, with non-word characters like punctuation
+ // being a secondary factor only after whitespace is addressed.
+ '/\'"(\s|$)/' => '’”$1',
+ '/(^|\s|<p>)\'"/' => '$1‘“',
+ '/\'"(\W)/' => '’”$1',
+ '/(\W)\'"/' => '$1‘“',
+ '/"\'(\s|$)/' => '”’$1',
+ '/(^|\s|<p>)"\'/' => '$1“‘',
+ '/"\'(\W)/' => '”’$1',
+ '/(\W)"\'/' => '$1“‘',