Sha256: 5e17cf605e64a2d23243d9f7ac903d614b8fbc13b1f9ea4bd6f4c48e134e6a08
Contents?: true
Size: 347 Bytes
Versions: 4
Compression:
Stored size: 347 Bytes
Contents
description 'Source code highlighting aspect' dependencies 'utils/pygments' Aspect.create(:highlight, :priority => 2, :layout => true, :cacheable => true) do def accepts?(page); !page.content.empty? && Pygments.file_format(page.name); end def call(context, page); Pygments.pygmentize(page.content, Pygments.file_format(page.name)); end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
olelo-0.9.3 | plugins/aspects/highlight.rb |
olelo-0.9.2 | plugins/aspects/highlight.rb |
olelo-0.9.1 | plugins/aspects/highlight.rb |
olelo-0.9.0 | plugins/aspects/highlight.rb |