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
We still do lowering of the param strings in some internal use of this, but the exported `GetParam` method is changed to a more sensible default.
This was used for the `disqus_title` etc. in the internal Disqus template, which was obviously not right.
If you really want to lowercase your params, do it with `.GetParam "myparam" | lower` or similar.
Fixes#4187
t.Errorf("frontmatter not handling strings correctly should be %s, got: %s", "bar", page.GetParam("a_string"))
1070
+
ifpage.getParamToLower("a_string") !="bar" {
1071
+
t.Errorf("frontmatter not handling strings correctly should be %s, got: %s", "bar", page.getParamToLower("a_string"))
1072
1072
}
1073
-
ifpage.GetParam("an_integer") !=1 {
1074
-
t.Errorf("frontmatter not handling ints correctly should be %s, got: %s", "1", page.GetParam("an_integer"))
1073
+
ifpage.getParamToLower("an_integer") !=1 {
1074
+
t.Errorf("frontmatter not handling ints correctly should be %s, got: %s", "1", page.getParamToLower("an_integer"))
1075
1075
}
1076
-
ifpage.GetParam("a_float") !=1.3 {
1077
-
t.Errorf("frontmatter not handling floats correctly should be %f, got: %s", 1.3, page.GetParam("a_float"))
1076
+
ifpage.getParamToLower("a_float") !=1.3 {
1077
+
t.Errorf("frontmatter not handling floats correctly should be %f, got: %s", 1.3, page.getParamToLower("a_float"))
1078
1078
}
1079
-
ifpage.GetParam("a_bool") !=false {
1080
-
t.Errorf("frontmatter not handling bools correctly should be %t, got: %s", false, page.GetParam("a_bool"))
1079
+
ifpage.getParamToLower("a_bool") !=false {
1080
+
t.Errorf("frontmatter not handling bools correctly should be %t, got: %s", false, page.getParamToLower("a_bool"))
1081
1081
}
1082
-
ifpage.GetParam("a_date") !=dateval {
1083
-
t.Errorf("frontmatter not handling dates correctly should be %s, got: %s", dateval, page.GetParam("a_date"))
1082
+
ifpage.getParamToLower("a_date") !=dateval {
1083
+
t.Errorf("frontmatter not handling dates correctly should be %s, got: %s", dateval, page.getParamToLower("a_date"))
1084
1084
}
1085
-
param:=page.GetParam("a_table")
1085
+
param:=page.getParamToLower("a_table")
1086
1086
ifparam==nil {
1087
1087
t.Errorf("frontmatter not handling tables correctly should be type of %v, got: type of %v", reflect.TypeOf(page.Params["a_table"]), reflect.TypeOf(param))
0 commit comments