lib/kramdown/parser/kramdown/abbreviation.rb in kramdown-2.3.0 vs lib/kramdown/parser/kramdown/abbreviation.rb in kramdown-2.3.1

- old
+ new

@@ -44,10 +44,10 @@ sorted_abbrevs = @root.options[:abbrev_defs].keys.sort {|a, b| b.length <=> a.length } regexps = [Regexp.union(*sorted_abbrevs.map {|k| /#{Regexp.escape(k)}/ })] regexps << /(?=(?:\W|^)#{regexps.first}(?!\w))/ # regexp should only match on word boundaries end el.children.map! do |child| - if child.type == :text + if child.type == :text && el.options[:content_model] != :raw if child.value =~ regexps.first result = [] strscan = Kramdown::Utils::StringScanner.new(child.value, child.options[:location]) text_lineno = strscan.current_line_number while (temp = strscan.scan_until(regexps.last))