lib/rouge/theme.rb in rouge-1.4.0 vs lib/rouge/theme.rb in rouge-1.5.0

- old
+ new

@@ -88,13 +88,17 @@ nil end def get_style(token) - get_own_style(token) || styles[Token::Tokens::Text] + get_own_style(token) || base_style end + def base_style + styles[Token::Tokens::Text] + end + def name(n=nil) return @name if n.nil? @name = n.to_s Theme.registry[@name] = self @@ -144,9 +148,13 @@ yield "#{@scope} table pre { margin: 0; }" styles.each do |tok, style| style.render(css_selector(tok), &b) end + end + + def render_base(selector, &b) + self.class.base_style.render(selector, &b) end def style_for(tok) self.class.get_style(tok) end