apsislabs / jekyll-tidy

A gem for tidying Jekyll HTML output
MIT License
42 stars 5 forks source link

Error: Unmatched sequence on line 83 #20

Open claudiuconstantin opened 5 years ago

claudiuconstantin commented 5 years ago

After adding this line in my Gemfile and running bundle install:

gem 'jekyll-tidy', group: :jekyll_plugins

I'm getting an error when running bundle exec jekyll s: jekyll 3.7.4 | Error: Unmatched sequence on line 83

Is there any additional required configuration I'm missing?

wkirby commented 5 years ago

Thanks for reporting. I haven't seen this error before. Can you give me your ruby version number?

Thanks.

claudiuconstantin commented 5 years ago

ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]

ashmaroli commented 5 years ago

@claudiuconstantin You can provide additional info by running the build with --trace:

bundle exec jekyll build --verbose --trace
claudiuconstantin commented 5 years ago

C:[...]>bundle exec jekyll s --verbose --trace

D:\[...]>bundle exec jekyll s --verbose --trace
  Logging at level: debug
Configuration file: D:/[...]/_config.yml
  Logging at level: debug
      GitHub Pages: github-pages v193
      GitHub Pages: jekyll v3.7.4
         Requiring: jekyll-github-metadata
Dotenv not found. Skipping
         Requiring: jekyll-seo-tag
         Requiring: jekyll-feed
         Requiring: jekyll-sitemap
         Requiring: jekyll-coffeescript
         Requiring: jekyll-commonmark-ghpages
         Requiring: jekyll-gist
         Requiring: jekyll-github-metadata
         Requiring: jekyll-paginate
         Requiring: jekyll-relative-links
         Requiring: jekyll-optional-front-matter
         Requiring: jekyll-readme-index
         Requiring: jekyll-default-layout
         Requiring: jekyll-titles-from-headings
   GitHub Metadata: Initializing...
            Source: D:/[...]
       Destination: D:/[...]/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       EntryFilter: excluded /LICENSE.md
       EntryFilter: excluded /README.md
       EntryFilter: excluded /scripts
       EntryFilter: excluded /test-gem
           Reading: _posts/2018-11-11-a-poison-tree.md
           [...]
           Reading: _posts/2018-11-20-winter-trees.md
        Generating: JekyllOptionalFrontMatter::Generator finished in 4.7e-05 seconds.
        Generating: JekyllReadmeIndex::Generator finished in 7.5e-05 seconds.
        Generating: JekyllRelativeLinks::Generator finished in 0.000351 seconds.
        Generating: Jekyll::JekyllSitemap finished in 0.001083 seconds.
       Jekyll Feed: Generating feed for posts
        Generating: JekyllFeed::Generator finished in 0.003177 seconds.
        Generating: JekyllDefaultLayout::Generator finished in 0.004234 seconds.
        Generating: JekyllTitlesFromHeadings::Generator finished in 4.7e-05 seconds.
        Generating: Jekyll::Paginate::Pagination finished in 0.004732 seconds.
         Rendering: _posts/2018-11-11-a-poison-tree.md
  Pre-Render Hooks: _posts/2018-11-11-a-poison-tree.md
  Rendering Liquid: _posts/2018-11-11-a-poison-tree.md
  Rendering Markup: _posts/2018-11-11-a-poison-tree.md
  Rendering Layout: _posts/2018-11-11-a-poison-tree.md
  [...]
         Rendering: _posts/2018-11-20-winter-trees.md
  Pre-Render Hooks: _posts/2018-11-20-winter-trees.md
  Rendering Liquid: _posts/2018-11-20-winter-trees.md
  Rendering Markup: _posts/2018-11-20-winter-trees.md
         Rendering: about.md
  Pre-Render Hooks: about.md
  Rendering Liquid: about.md
  Rendering Markup: about.md
  Rendering Layout: about.md
         Rendering: assets/core.scss
  Pre-Render Hooks: assets/core.scss
  Rendering Liquid: assets/core.scss
  Rendering Markup: assets/core.scss
Traceback (most recent call last):
        31: from C:/Ruby25-x64/bin/jekyll:23:in `<main>'
        30: from C:/Ruby25-x64/bin/jekyll:23:in `load'
        29: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/exe/jekyll:15:in `<top (required)>'
        28: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        27: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        26: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        25: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        24: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        23: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
        22: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/serve.rb:93:in `start'
        21: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/serve.rb:93:in `each'
        20: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/serve.rb:93:in `block in start'
        19: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/build.rb:36:in `process'
        18: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/commands/build.rb:65:in `build'
        17: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/command.rb:28:in `process_site'
        16: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:73:in `process'
        15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:191:in `render'
        14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:471:in `render_pages'
        13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:471:in `each'
        12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/site.rb:474:in `block in render_pages'
        11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/page.rb:180:in `trigger_hooks'
        10: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/hooks.rb:102:in `trigger'
         9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/hooks.rb:102:in `each'
         8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.4/lib/jekyll/hooks.rb:103:in `block in trigger'
         7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-tidy-0.2.2/lib/jekyll/tidy.rb:58:in `block in <top (required)>'
         6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-tidy-0.2.2/lib/jekyll/tidy.rb:31:in `output_clean'
         5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/htmlbeautifier-1.3.1/lib/htmlbeautifier.rb:25:in `beautify'
         4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/htmlbeautifier-1.3.1/lib/htmlbeautifier.rb:25:in `tap'
         3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/htmlbeautifier-1.3.1/lib/htmlbeautifier.rb:26:in `block in beautify'
         2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/htmlbeautifier-1.3.1/lib/htmlbeautifier/parser.rb:16:in `scan'
         1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/htmlbeautifier-1.3.1/lib/htmlbeautifier/parser.rb:29:in `dispatch'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/htmlbeautifier-1.3.1/lib/htmlbeautifier/parser.rb:34:in `rescue in dispatch': Unmatched sequence on line 83 (RuntimeError)

Running on Windows 10, by the way.

claudiuconstantin commented 5 years ago

Maybe you're wondering what's in that core.scss file, as I did after seeing the above log:

---
# Front matter comment to ensure Jekyll properly reads file.
---

@import 'main';
@import 'syntax';

if I comment this file content the command seems to run just fine :)

claudiuconstantin commented 5 years ago

Any news here?

Potherca commented 4 years ago

I had a similar issue, for me the error was with a JS file.

As a workaround, I just told jekyll-tidy to ignore JS and SCSS files in _config.yml:

jekyll_tidy:
  exclude:
    - '**/*.scss'
    - '**/*.js'
wkirby commented 4 years ago

We have long since moved on from Jekyll, but if someone wants to open a PR making these asset exclusions part of the default I'll be happy to merge it.