tilt 2.4.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/COPYING +1 -1
- data/lib/tilt/asciidoc.rb +12 -5
- data/lib/tilt/babel.rb +5 -0
- data/lib/tilt/builder.rb +4 -0
- data/lib/tilt/coffee.rb +14 -4
- data/lib/tilt/commonmarker.rb +65 -0
- data/lib/tilt/csv.rb +35 -25
- data/lib/tilt/erb.rb +67 -2
- data/lib/tilt/erubi.rb +41 -8
- data/lib/tilt/etanni.rb +7 -0
- data/lib/tilt/haml.rb +67 -1
- data/lib/tilt/herb.rb +110 -0
- data/lib/tilt/kramdown.rb +47 -1
- data/lib/tilt/liquid.rb +66 -13
- data/lib/tilt/livescript.rb +11 -4
- data/lib/tilt/mapping.rb +9 -9
- data/lib/tilt/markaby.rb +11 -2
- data/lib/tilt/nokogiri.rb +13 -2
- data/lib/tilt/pandoc.rb +43 -1
- data/lib/tilt/pipeline.rb +6 -1
- data/lib/tilt/plain.rb +5 -1
- data/lib/tilt/prawn.rb +17 -6
- data/lib/tilt/radius.rb +55 -0
- data/lib/tilt/rdiscount.rb +65 -6
- data/lib/tilt/rdoc.rb +33 -11
- data/lib/tilt/redcarpet.rb +42 -0
- data/lib/tilt/redcloth.rb +28 -1
- data/lib/tilt/rst-pandoc.rb +24 -1
- data/lib/tilt/sass.rb +16 -3
- data/lib/tilt/slim.rb +13 -0
- data/lib/tilt/string.rb +10 -2
- data/lib/tilt/template.rb +189 -33
- data/lib/tilt/typescript.rb +5 -0
- data/lib/tilt/yajl.rb +46 -36
- data/lib/tilt.rb +12 -7
- metadata +5 -10
- data/lib/tilt/creole.rb +0 -14
- data/lib/tilt/erubis.rb +0 -51
- data/lib/tilt/maruku.rb +0 -10
- data/lib/tilt/wikicloth.rb +0 -12
data/lib/tilt/erubis.rb
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
require_relative 'erb'
|
|
3
|
-
require 'erubis'
|
|
4
|
-
|
|
5
|
-
warn 'tilt/erubis is deprecated, as erubis requires modifying string literals', uplevel: 1
|
|
6
|
-
|
|
7
|
-
module Tilt
|
|
8
|
-
# Erubis template implementation. See:
|
|
9
|
-
# http://www.kuwata-lab.com/erubis/
|
|
10
|
-
#
|
|
11
|
-
# ErubisTemplate supports the following additional options, which are not
|
|
12
|
-
# passed down to the Erubis engine:
|
|
13
|
-
#
|
|
14
|
-
# :engine_class allows you to specify a custom engine class to use
|
|
15
|
-
# instead of the default (which is ::Erubis::Eruby).
|
|
16
|
-
#
|
|
17
|
-
# :escape_html when true, ::Erubis::EscapedEruby will be used as
|
|
18
|
-
# the engine class instead of the default. All content
|
|
19
|
-
# within <%= %> blocks will be automatically html escaped.
|
|
20
|
-
class ErubisTemplate < ERBTemplate
|
|
21
|
-
def prepare
|
|
22
|
-
@freeze_string_literals = !!@options.delete(:freeze)
|
|
23
|
-
@outvar = @options.delete(:outvar) || '_erbout'
|
|
24
|
-
@options[:preamble] = false
|
|
25
|
-
@options[:postamble] = false
|
|
26
|
-
@options[:bufvar] = @outvar
|
|
27
|
-
engine_class = @options.delete(:engine_class)
|
|
28
|
-
engine_class = ::Erubis::EscapedEruby if @options.delete(:escape_html)
|
|
29
|
-
@engine = (engine_class || ::Erubis::Eruby).new(@data, @options)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def precompiled_preamble(locals)
|
|
33
|
-
[super, "#{@outvar} = _buf = String.new"].join("\n")
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def precompiled_postamble(locals)
|
|
37
|
-
[@outvar, super].join("\n")
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# Erubis doesn't have ERB's line-off-by-one under 1.9 problem.
|
|
41
|
-
# Override and adjust back.
|
|
42
|
-
def precompiled(locals)
|
|
43
|
-
source, offset = super
|
|
44
|
-
[source, offset - 1]
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def freeze_string_literals?
|
|
48
|
-
@freeze_string_literals
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
data/lib/tilt/maruku.rb
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
require_relative 'template'
|
|
3
|
-
require 'maruku'
|
|
4
|
-
|
|
5
|
-
warn 'tilt/maruku is deprecated, as maruku requires modifying string literals', uplevel: 1
|
|
6
|
-
|
|
7
|
-
# Maruku markdown implementation. See: https://github.com/bhollis/maruku
|
|
8
|
-
Tilt::MarukuTemplate = Tilt::StaticTemplate.subclass do
|
|
9
|
-
Maruku.new(@data, @options).to_html
|
|
10
|
-
end
|
data/lib/tilt/wikicloth.rb
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
require_relative 'template'
|
|
3
|
-
require 'wikicloth'
|
|
4
|
-
|
|
5
|
-
warn 'tilt/wikicloth is deprecated, as wikicloth requires modifying string literals', uplevel: 1
|
|
6
|
-
|
|
7
|
-
# WikiCloth implementation. See: https://github.com/nricciar/wikicloth
|
|
8
|
-
Tilt::WikiClothTemplate = Tilt::StaticTemplate.subclass do
|
|
9
|
-
parser = @options.delete(:parser) || WikiCloth::Parser
|
|
10
|
-
@options[:data] = @data
|
|
11
|
-
parser.new(@options).to_html
|
|
12
|
-
end
|