diff --git a/docs/_includes/includesnippet b/docs/_includes/includesnippet index ecd1ff1..ce2eb83 100644 --- a/docs/_includes/includesnippet +++ b/docs/_includes/includesnippet @@ -18,7 +18,8 @@ Example: {%- capture filecontent -%} {%- include {{include.filename}} -%} {%- endcapture -%} -{%- assign lines = filecontent | rstrip | newline_to_br | split: '
' -%} +{%- assign lines = filecontent | rstrip | split: " +" -%} {%- assign start = {{include.start}} -%} {%- assign count = {{include.count}} -%} {%- for line in lines -%} @@ -30,6 +31,10 @@ Example: {%- assign count = end | minus: start -%} {%- endif -%} {%- endfor -%} -{%- for line in lines offset: {{start}} limit: {{count}} -%} - {{- line | rstrip -}} -{%- endfor -%} +{% for line in lines offset: {{start}} limit: {{count}} -%} +{% if forloop.last -%} +{{- line | rstrip -}} +{%- else -%} +{{- line | rstrip }} +{% endif -%} +{% endfor -%}