Commit 95d6174a authored by http://jneen.net/'s avatar http://jneen.net/

remove the unused inline_theme feature

parent 96c68c50
...@@ -26,15 +26,13 @@ module Rouge ...@@ -26,15 +26,13 @@ module Rouge
# [+lineanchorsid+] If lineanchors is true the name of the anchors can # [+lineanchorsid+] If lineanchors is true the name of the anchors can
# be changed with lineanchorsid to e.g. foo-linenumber # be changed with lineanchorsid to e.g. foo-linenumber
# (default: 'L'). # (default: 'L').
# [+inline_theme+] Inline CSS styles for the <pre> tag (default: false).
def initialize( def initialize(
nowrap: false, nowrap: false,
cssclass: 'highlight', cssclass: 'highlight',
linenos: nil, linenos: nil,
linenostart: 1, linenostart: 1,
lineanchors: false, lineanchors: false,
lineanchorsid: 'L', lineanchorsid: 'L'
inline_theme: nil
) )
@nowrap = nowrap @nowrap = nowrap
@cssclass = cssclass @cssclass = cssclass
...@@ -42,7 +40,6 @@ module Rouge ...@@ -42,7 +40,6 @@ module Rouge
@linenostart = linenostart @linenostart = linenostart
@lineanchors = lineanchors @lineanchors = lineanchors
@lineanchorsid = lineanchorsid @lineanchorsid = lineanchorsid
@inline_theme = Theme.find(inline_theme).new if inline_theme.is_a?(String)
end end
def render(tokens) def render(tokens)
...@@ -149,15 +146,10 @@ module Rouge ...@@ -149,15 +146,10 @@ module Rouge
if tok.shortname.empty? if tok.shortname.empty?
val val
else
if @inline_theme
rules = @inline_theme.style_for(tok).rendered_rules
"<span style=\"#{rules.to_a.join(';')}\"#{val}</span>"
else else
"<span class=\"#{tok.shortname}\">#{val}</span>" "<span class=\"#{tok.shortname}\">#{val}</span>"
end end
end end
end end
end end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment