pygments / pygments.rb

💎 Ruby wrapper for Pygments syntax highlighter
MIT License
572 stars 141 forks source link

Ruby comment highlighting broken #144

Closed weaksauce closed 7 years ago

weaksauce commented 9 years ago

expect this to highlight the embedded string interpolation as tokens instead of the first # sign commenting out the rest of the line.

desc "Show off the API"
  task :ditty do
    on roles(:all) do |host|
      # Capture output from the remote host, and re-use it
      # we can reflect on the `host` object passed to the block
      # and use the `info` logger method to benefit from the
      # output formatter that is selected.
      uptime = capture('uptime')
      if host.roles.include?(:web)
        info "Your webserver #{host} has uptime: #{uptime}"
      end
    end

  end

on github pages the default version of this gem is 0.6.0 and the problem exists there. you can see it live on http://capistranorb.com/documentation/overview/what-is-capistrano/ at the bottom of the page.

interestingly enough it's handled correctly on the above code.

tmm1 commented 9 years ago

This is likely an upstream issue in pygments itself, and should be reported against that project.

weaksauce commented 9 years ago

pygments is working actually: http://pygments.org/demo/1089661/

the latest version of pygments is 2.0.1 and I think this gem uses 1.7

are there any breaking changes that would stop an upgrade to 2.0.1?