From b6b157bc9f9445a716692ea599af7f6e4a69c849 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sat, 17 Dec 2022 22:07:18 +0100 Subject: template: fix whitespacing --- templates/shortcodes/include_range.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'templates/shortcodes/include_range.md') diff --git a/templates/shortcodes/include_range.md b/templates/shortcodes/include_range.md index cfcce76..b8ec9e5 100644 --- a/templates/shortcodes/include_range.md +++ b/templates/shortcodes/include_range.md @@ -1,17 +1,17 @@ -{# Args: #} -{# path - file to load #} -{# start - start line #} -{# end - end line #} -{# #} -{# Example: #} -{# {{ include_range(path="..", start=1, end=2) }} #} +{#- Args: -#} +{#- path - file to load -#} +{#- start - start line -#} +{#- end - end line -#} +{#- -#} +{#- Example: -#} +{#- {{ include_range(path="..", start=1, end=2) }} -#} -{% set data = load_data(path=path) | split(pat="\n") | slice(start=start-1, end=end) %} +{% set data = load_data(path=path) | split(pat="\n") | slice(start=start-1, end=end) -%} {% for line in data -%} - {{ line }} -{% endfor %} + {{ line -}} +{% endfor -%} -{# The '-' in the for loop is important, it removes the whitespaces after the stmt. #} -{# See: https://tera.netlify.app/docs/#whitespace-control #} +{#- The '-' in the for loop is important, it removes the whitespaces after the stmt. -#} +{#- See: https://tera.netlify.app/docs/#whitespace-control -#} -{# Note: I wasn't able to pull this off with a join(), maybe I'll debug one day. #} +{#- Note: I wasn't able to pull this off with a join(), maybe I'll debug one day. -#} -- cgit v1.2.3