Fixed a bug when an opening quote is preceded by a paragraph tag and immediately followed by another tag.
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index 11b3917..1ae4577 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -267,23 +267,23 @@
// on which direction to curl, with non-word characters like punctuation
// being a secondary factor only after whitespace is addressed.
'/\'"(\s|$)/' => '’”$1',
- '/(^|\s)\'"/' => '$1‘“',
+ '/(^|\s|<p>)\'"/' => '$1‘“',
'/\'"(\W)/' => '’”$1',
'/(\W)\'"/' => '$1‘“',
'/"\'(\s|$)/' => '”’$1',
- '/(^|\s)"\'/' => '$1“‘',
+ '/(^|\s|<p>)"\'/' => '$1“‘',
'/"\'(\W)/' => '”’$1',
'/(\W)"\'/' => '$1“‘',
// single quote smart quotes
'/\'(\s|$)/' => '’$1',
- '/(^|\s)\'/' => '$1‘',
+ '/(^|\s|<p>)\'/' => '$1‘',
'/\'(\W)/' => '’$1',
'/(\W)\'/' => '$1‘',
// double quote smart quotes
'/"(\s|$)/' => '”$1',
- '/(^|\s)"/' => '$1“',
+ '/(^|\s|<p>)"/' => '$1“',
'/"(\W)/' => '”$1',
'/(\W)"/' => '$1“',