Liquid syntax error (line 2): Tag '{%' was not properly terminated with regexp: /\%\}/
thomasdn opened this issue · 4 comments
When I try to use the compress layout, I get this error:
Liquid Exception: Liquid syntax error (line 2): Tag '{%' was not properly terminated with regexp: /\%\}/ in /.../_layouts/compress.html
I have this in my default.html layout:
---
layout: compress
---
And I have compress.html in my _layouts folder.
Did I use this wrong? Or is there an error in compress.html?
my compress.html sha256 hash is: 62dc8cb78cb3df060e522f603ef6e598572f45be084198cea44e7abdc9d22427
Compress works fine for me on several sites and many hundred pages.
Might there be syntax problems in your markdown / html?
[Also there occur problems with //
comments (must use /* … */
) but that would not result in your error message.]
I'm not sure if I have errors in my markdown or html - I have not experienced any problems with it so far...
I do not have //
comments nor /* */
comments anywhere - was not aware those would even work in Markdown?
I do have <!-- -->
comments in the generated HTML thorughout both include files and layouts. Is this a problem?
Some more details from running jekyll s --trace:
Liquid Exception: Liquid syntax error (line 2): Tag '{%' was not properly terminated with regexp: /\%\}/ in /..../_layouts/compress.html
/var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:132:in `raise_missing_tag_terminator': Liquid syntax error (line 2): Tag '{%' was not properly terminated with regexp: /\\%\\}/ (Liquid::SyntaxError)
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:24:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/block.rb:58:in `parse_body'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/tags/if.rb:30:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/tag.rb:10:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:34:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/block.rb:58:in `parse_body'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/tags/if.rb:30:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/tag.rb:10:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:34:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/block.rb:58:in `parse_body'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/tags/if.rb:30:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/tag.rb:10:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:34:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/document.rb:10:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/document.rb:5:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/template.rb:130:in `parse'
from /var/lib/gems/3.1.0/gems/liquid-4.0.4/lib/liquid/template.rb:114:in `parse'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:13:in `block in parse'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:70:in `measure_time'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:12:in `parse'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:124:in `render_liquid'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:192:in `render_layout'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:161:in `place_in_layouts'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:93:in `render_document'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:63:in `run'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:572:in `render_regenerated'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:557:in `block (2 levels) in render_docs'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:556:in `each'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:556:in `block in render_docs'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:555:in `each_value'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:555:in `render_docs'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:210:in `render'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:80:in `process'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:28:in `process_site'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:65:in `build'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:36:in `process'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `each'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /usr/share/rubygems-integration/all/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /usr/share/rubygems-integration/all/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /usr/share/rubygems-integration/all/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /usr/share/rubygems-integration/all/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /usr/share/rubygems-integration/all/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>'
from /bin/jekyll:25:in `load'
from /bin/jekyll:25:in `<main>'
<!-- … -->
comments are no problem.
Consider to whittle down your site to perhaps just one trivial page.
<!-- … -->
comments are no problem. Consider to whittle down your site to perhaps just one trivial page.
Great idea!
I did this, and the error persisted.
So I did a new download of the compress.html file.
And it appeared something was corrupted in the file in my first download. With the second download, it just works.
Thanks for quick help!