You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/_index.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -789,21 +789,20 @@ the `from` string replaced with the `to` string.
789
789
Example: `{{ name | replace(from="Robert", to="Bob")}}`
790
790
791
791
#### addslashes
792
-
Adds slashes before quotes.
792
+
Adds slashes before single quote (`'`), double quote (`"`) and slash (`\`) chars.
793
793
794
794
Example: `{{ value | addslashes }}`
795
795
796
-
If value is "I'm using Tera", the output will be "I\\'m using Tera".
796
+
If value is \`Alice said, "I'm using \\ in Tera"\`, the output will be \`Alice said, \\"I\\'m using \\\\ in Tera\\"\`.
797
797
798
798
#### slugify
799
799
Only available if the `builtins` feature is enabled.
800
800
801
-
Transforms a string into ASCII, lowercases it, trims it, converts spaces to hyphens and
802
-
removes all characters that are not numbers, lowercase letters or hyphens.
801
+
Transforms a string into ASCII, lowercases it, trims it, converts all characters that are not numbers or lowercase letters to hyphens, replaces continuous sequence of hyphens with a single hyphen and removes leading and trailing hyphens if any.
803
802
804
803
Example: `{{ value | slugify }}`
805
804
806
-
If value is "-Hello world! ", the output will be "hello-world".
805
+
If value is " -This-- Is तेरा! ", the output will be "this-is-teraa".
807
806
808
807
#### title
809
808
Capitalizes each word inside a sentence.
@@ -822,16 +821,16 @@ Removes leading whitespace if the variable is a string.
822
821
Removes trailing whitespace if the variable is a string.
823
822
824
823
#### trim_start_matches
825
-
Removes leading characters that match the given pattern if the variable is a string.
824
+
Repeatedly removes leading characters that match the given pattern if the variable is a string.
826
825
827
-
Example: `{{ value | trim_start_matches(pat="//") }}`
826
+
Example: `{{ value | trim_start_matches(pat="/") }}`
828
827
829
828
If value is "//a/b/c//", the output will be "a/b/c//".
830
829
831
830
#### trim_end_matches
832
-
Removes trailing characters that match the given pattern if the variable is a string.
831
+
Repeatedly removes trailing characters that match the given pattern if the variable is a string.
833
832
834
-
Example: `{{ value | trim_end_matches(pat="//") }}`
833
+
Example: `{{ value | trim_end_matches(pat="/") }}`
835
834
836
835
If value is "//a/b/c//", the output will be "//a/b/c".
0 commit comments