mirror of https://github.com/istio/istio.io.git
Special case empty @@ in code blocks to be NOPs.
This commit is contained in:
parent
4e2b9233bc
commit
4bba186b81
|
@ -52,6 +52,9 @@ be invalid HTML
|
|||
{{ $branch := .Site.Data.args.branch_name }}
|
||||
{{ $links := findRE "@(.*?)@" ($scratch.Get "text") }}
|
||||
{{ range $link := $links }}
|
||||
{{ $href := printf "https://raw.githubusercontent.com/istio/istio/%s/%s" $branch (trim $link "@") }}
|
||||
{{ $target := trim $link "@" }}
|
||||
{{ if gt (len $target) 0 }}
|
||||
{{ $href := printf "https://raw.githubusercontent.com/istio/istio/%s/%s" $branch $target }}
|
||||
<a hidden style="display:none" href="{{ $href }}"></a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue