0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

getting-started/theming.md: throw an error if the regex doesn't succeed.

This commit is contained in:
XhmikosR 2019-09-01 13:23:58 +03:00
parent cf4ae75eff
commit 2c9e22ef88

View 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 >}}