You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
527 B
HTML

{{ $params := . }}
{{ $fullpages := false }}
{{ $page := . }}
{{ if reflect.IsMap $params }}
{{ $fullpages = $params.fullpages }}
{{ $page = $params.page }}
{{ end }}
{{ $content := cond ($fullpages | not) ($page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1}<a aria-label="%v" class="paige-header-link" href="#${2}">#</a>${3}` (i18n "paige_aria_section_link")) | safeHTML) $page.Content }}
{{ with $content }}
<div class="mw-100 overflow-x-auto paige-content">{{ . }}</div>
{{ end }}