lib/rouge/theme.rb in rouge-0.2.1 vs lib/rouge/theme.rb in rouge-0.2.2

- old
+ new

@@ -74,15 +74,17 @@ tokens.each do |tok| styles[tok.to_s] = style end end - def get_style(token) + def get_own_style(token) token.ancestors do |anc| return styles[anc.name] if styles[anc.name] end + end - styles['Text'] + def get_style(token) + get_own_style(token) || style['Text'] end def name(n=nil) return @name if n.nil?