سؤال

I'm using Jekyll to convert my markdown and Pygments for syntax highlighting.

Here is the error maruku displays:

Liquid error: undefined method `join' for "\n song_info = []\n for song in songs:\n song_info.append(song.name) \n":String

The markup is as follows:

{% highlight python %}
    song_info = []
    for song in songs:
        song_info.append(song.name)                                                                                                                                   
{% endhighlight %}

Testing Pygments in iPython produces no errors.

Any ideas? ;o(

Thanks in advance!

هل كانت مفيدة؟

المحلول

I had the same problem and reverted the liquid gem to version 2.2.2 as a workaround. Seems like a bug in the 2.3.0 version's pygments support, or Jekyll's use of it.

sudo gem uninstall liquid
sudo gem install liquid --version '2.2.2'

نصائح أخرى

On a side note, GitHub recommends using RedCarpet.

To use it, configure Jekyll by adding markdown: redcarpet to ./_config.yml. Then, install RedCarpet with [sudo] gem install redcarpet on your development machine so you can compile your Jekyll site.

Simply replace liquid-2.3.0 gem files with latest version from Github.

It works with jekyll-0.11.2 + liquid-2.3.0 + Pygments

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top