{{ $random := delimit (shuffle (split (md5 .Page.File.UniqueID) "" )) "" }} {{ $id := printf "dp-show-%s" $random}} {{ $condition := trim (.Get 0) " "}} {{ $regFormValue := printf "formValue('$1')"}} {{ $conditionFix := replaceRE `{(\w+)}` $regFormValue $condition }} {{ $conditionFix = replace $conditionFix ` and ` ` && ` }} {{ $conditionFix = replace $conditionFix ` or ` ` || ` }} {{ $conditionFix = replaceRE `[^)]+has\s+('\w+')` ".includes($1)" $conditionFix }}