summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-07 15:17:04 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-07 15:17:04 +0100
commite0da15316d6a00334cd3c56421ad361453bd4281 (patch)
tree82d7a318abd57ff50647a1a3c1aeaf8a52cbab62
parent45082b6118a9b66e48c16582f72d4499d2c290c6 (diff)
[ci skip] Update the Text helper docs
-rw-r--r--user_guide_src/source/helpers/text_helper.rst16
1 files changed, 13 insertions, 3 deletions
diff --git a/user_guide_src/source/helpers/text_helper.rst b/user_guide_src/source/helpers/text_helper.rst
index 0cacd1b69..3c6430f3f 100644
--- a/user_guide_src/source/helpers/text_helper.rst
+++ b/user_guide_src/source/helpers/text_helper.rst
@@ -35,7 +35,7 @@ The following functions are available:
$string = "Here is a nice text string consisting of eleven words.";
$string = word_limiter($string, 4);
- // Returns: Here is a nice…
+ // Returns: Here is a nice
The third parameter is an optional suffix added to the string. By
default it adds an ellipsis.
@@ -56,7 +56,7 @@ The following functions are available:
$string = "Here is a nice text string consisting of eleven words.";
$string = character_limiter($string, 20);
- // Returns: Here is a nice text string…
+ // Returns: Here is a nice text string
The third parameter is an optional suffix added to the string, if
undeclared this helper uses an ellipsis.
@@ -143,7 +143,7 @@ The following functions are available:
colors used are the ones specified in your php.ini file.
-.. function:: highlight_phrase($str, $phrase[, $tag_open = '<strong>'[, $tag_close = '</strong>']])
+.. function:: highlight_phrase($str, $phrase[, $tag_open = '<mark>'[, $tag_close = '</mark>']])
:param string $str: Input string
:param string $phrase: Phrase to highlight
@@ -165,6 +165,16 @@ The following functions are available:
Here is a <span style="color:#990000;">nice text</span> string about nothing in particular.
+ .. note:: This function used to use the ``<strong>`` tag by default. Older browsers
+ might not support the new HTML5 mark tag, so it is recommended that you
+ insert the following CSS code into your stylesheet if you need to support
+ such browsers::
+
+ mark {
+ background: #ff0;
+ color: #000;
+ };
+
.. function:: word_wrap($str[, $charlim = 76])