Why endraw doesn't support whitespace trimming as raw tag?

Jekyll version: 4.2.1

Why endraw doesn’t support whitespace trimming as raw tag? The following markup throws an exception (Liquid Exception: Liquid syntax error (line 8): 'raw' tag was never closed in):

{%- raw -%}
range { -h | --help } { -v | --version } { -i | --interactive }
range <from>..<to>[..<step>]
{%- endraw -%}

but this don’t:

{%- raw -%}
range { -h | --help } { -v | --version } { -i | --interactive }
range <from>..<to>[..<step>]
{% endraw %}

Your second grouping of code looks like this:

{%- raw -%}
range { -h | --help } { -v | --version } { -i | --interactive }
range <from>..<to>[..<step>]
{% endraw %}

Note that you start with {%- raw -%}, but you end with {% endraw %}.

I think all you need to do is change that last line to {%- endraw -%}, and that will fix the problem.

You can modify your code so it looks like the following snippet, and Jekyll should no longer throw an error:

{%- raw -%}
range { -h | --help } { -v | --version } { -i | --interactive }
range <from>..<to>[..<step>]
{%- endraw -%}
1 Like