{% comment -%}{% raw %}{% endraw %}{% endcomment -%} {%- if include.rel %}{% capture filecontent %}{% include_relative {{include.filename}} %}{% endcapture -%} {%- else %}{% capture filecontent %}{% include {{include.filename}} %}{% endcapture %}{% endif -%} {%- assign lines = filecontent | newline_to_br | strip_newlines | split: '
' -%} {%- assign starts = include.start | default: '0' | split: ',' -%} {%-assign counts = include.count | default: lines.size | split: ',' -%} {%- for start in starts -%} {% unless forloop.first %}{% assign next = start | plus: 0 %}{% if next <= prev %}!!!INCLUDELINES HELPER FILE WARNING OVERLAPPING LINES next startline = {{next}} <= previous fragment end = {{prev}} - CHECK YOUR SOURCE FILE!!!{% break %}{% endif %}{% endunless -%} {% for line in lines offset: start limit:counts[forloop.index0] %}{% if include.linenumber %}{{ forloop.index0 | plus: start}} {% endif %}{{ line }} {% endfor -%} {%- unless forloop.last %}... {% assign prev = start | plus: counts[forloop.index0] %}{% endunless -%} {%- endfor -%}