lib/html/pipeline/ruby_markup/transformer.rb in html-pipeline-ruby_markup-0.9.1 vs lib/html/pipeline/ruby_markup/transformer.rb in html-pipeline-ruby_markup-0.9.2
- old
+ new
@@ -33,10 +33,10 @@
RubyMarkupInsideCodePattern = /`.*#{RubyTagPattern}.*`/
attr_reader :content
def traverser
- @traverser ||= MarkdownTraverser.new(content)
+ @traverser ||= content.empty? ? [] : MarkdownTraverser.new(content)
end
def transform_ruby_markups!
traverser.each do |line|
next if traverser.in_codeblock?