From: XhmikosR Date: Sun, 1 Sep 2019 10:23:58 +0000 (+0300) Subject: getting-started/theming.md: throw an error if the regex doesn't succeed. X-Git-Tag: v5.0.0-alpha1~781 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c9e22ef889b1b88df7b956d705a1069c10d5e68;p=thirdparty%2Fbootstrap.git getting-started/theming.md: throw an error if the regex doesn't succeed. --- diff --git a/site/content/docs/4.3/getting-started/theming.md b/site/content/docs/4.3/getting-started/theming.md index 9c34c9ee3f..1703770e70 100644 --- a/site/content/docs/4.3/getting-started/theming.md +++ b/site/content/docs/4.3/getting-started/theming.md @@ -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 >}}