{{- $input := . -}} {{- $output := replaceRE `:\/` "://" ($input | replaceRE `\/+` "/") 1 -}} {{- return $output -}}