summaryrefslogtreecommitdiffstats
path: root/system/libraries/Typography.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Typography.php')
-rw-r--r--system/libraries/Typography.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index 50bd12486..a50934f2c 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -38,7 +38,7 @@ class CI_Typography {
/**
* Block level elements that should not be wrapped inside <p> tags
- *
+ *
* @var string
*/
public $block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul';
@@ -52,7 +52,7 @@ class CI_Typography {
/**
* Tags we want the parser to completely ignore when splitting the string.
- *
+ *
* @var string
*/
public $inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var';
@@ -95,7 +95,7 @@ class CI_Typography {
*/
public function auto_typography($str, $reduce_linebreaks = FALSE)
{
- if ($str == '')
+ if ($str === '')
{
return '';
}
@@ -173,7 +173,7 @@ class CI_Typography {
$process = ($match[1] === '/');
}
- if ($match[1] == '')
+ if ($match[1] === '')
{
$this->last_block_element = $match[2];
}
@@ -344,7 +344,7 @@ class CI_Typography {
*/
protected function _format_newlines($str)
{
- if ($str == '' OR (strpos($str, "\n") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required)))
+ if ($str === '' OR (strpos($str, "\n") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required)))
{
return $str;
}
@@ -356,7 +356,7 @@ class CI_Typography {
$str = preg_replace("/([^\n])(\n)([^\n])/", '\\1<br />\\2\\3', $str);
// Wrap the whole enchilada in enclosing paragraphs
- if ($str != "\n")
+ if ($str !== "\n")
{
// We trim off the right-side new line so that the closing </p> tag
// will be positioned immediately following the string, matching