From 2c9e22ef889b1b88df7b956d705a1069c10d5e68 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 1 Sep 2019 13:23:58 +0300 Subject: [PATCH] getting-started/theming.md: throw an error if the regex doesn't succeed. --- site/content/docs/4.3/getting-started/theming.md | 4 ++++ 1 file changed, 4 insertions(+) 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 >}}