lib/kramdown/converter/base.rb in kramdown-2.4.0 vs lib/kramdown/converter/base.rb in kramdown-2.5.0

- old
+ new

@@ -135,19 +135,19 @@ erb.result(obj.instance_eval { binding }) end # Return the template specified by +template+. def self.get_template(template) # :nodoc: - format_ext = '.' + ::Kramdown::Utils.snake_case(self.name.split(/::/).last) + format_ext = '.' + ::Kramdown::Utils.snake_case(name.split("::").last) shipped = File.join(::Kramdown.data_dir, template + format_ext) if File.exist?(template) File.read(template) elsif File.exist?(template + format_ext) File.read(template + format_ext) elsif File.exist?(shipped) File.read(shipped) elsif template.start_with?('string://') - template.sub(/\Astring:\/\//, '') + template.delete_prefix("string://") else raise "The specified template file #{template} does not exist" end end