multicolumn-list.html 434 B

1234567891011
  1. <!-- Does not support nested list but shouldn't need to have multicolumn nested lists-->
  2. {{- $numColumns := .Get "columns" | default "2" -}}
  3. <ul style="column-count: {{ $numColumns }}">
  4. {{- $lines := split .Inner "\n" -}}
  5. {{- range $lines -}}
  6. {{- $line := trim . " \t" -}}
  7. {{- if hasPrefix $line "- " -}}
  8. <li>{{ $line | replaceRE "^\\-\\s+" "" | markdownify }}</li>
  9. {{- end -}}
  10. {{- end -}}
  11. </ul>