]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
getting-started/theming.md: throw an error if the regex doesn't succeed.
authorXhmikosR <xhmikosr@gmail.com>
Sun, 1 Sep 2019 10:23:58 +0000 (13:23 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Fri, 6 Sep 2019 08:57:50 +0000 (11:57 +0300)
site/content/docs/4.3/getting-started/theming.md

index 9c34c9ee3f7c13cbd1e058a9d72cd9eb298c93c8..1703770e7026e8758f7ff29d133e8cfa9b3a8a9e 100644 (file)
@@ -373,6 +373,10 @@ Here are the variables we include (note that the `:root` is required). They're l
 {{- $css := readFile "dist/css/bootstrap.css" -}}
 {{- $match := findRE ":root {([^}]*)}" $css 1 -}}
 
+{{- if (eq (len $match) 0) -}}
+{{- errorf "Got no matches for :root in %q!" $.Page.Path -}}
+{{- end -}}
+
 {{- index $match 0 -}}
 
 {{< /root.inline >}}