Commit 96c68c50 authored by http://jneen.net/'s avatar http://jneen.net/

deprecate @anchorlinenos

parent 7d456ad4
...@@ -26,9 +26,6 @@ module Rouge ...@@ -26,9 +26,6 @@ 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').
# [+anchorlinenos+] If set to true, will wrap line numbers in <tt><a></tt>
# tags. Used in combination with linenos and lineanchors
# (default: false).
# [+inline_theme+] Inline CSS styles for the <pre> tag (default: false). # [+inline_theme+] Inline CSS styles for the <pre> tag (default: false).
def initialize( def initialize(
nowrap: false, nowrap: false,
...@@ -37,7 +34,6 @@ module Rouge ...@@ -37,7 +34,6 @@ module Rouge
linenostart: 1, linenostart: 1,
lineanchors: false, lineanchors: false,
lineanchorsid: 'L', lineanchorsid: 'L',
anchorlinenos: false,
inline_theme: nil inline_theme: nil
) )
@nowrap = nowrap @nowrap = nowrap
...@@ -46,7 +42,6 @@ module Rouge ...@@ -46,7 +42,6 @@ module Rouge
@linenostart = linenostart @linenostart = linenostart
@lineanchors = lineanchors @lineanchors = lineanchors
@lineanchorsid = lineanchorsid @lineanchorsid = lineanchorsid
@anchorlinenos = anchorlinenos
@inline_theme = Theme.find(inline_theme).new if inline_theme.is_a?(String) @inline_theme = Theme.find(inline_theme).new if inline_theme.is_a?(String)
end end
...@@ -120,11 +115,6 @@ module Rouge ...@@ -120,11 +115,6 @@ module Rouge
end end
def wrap_linenos(numbers) def wrap_linenos(numbers)
if @anchorlinenos
numbers.map! do |number|
"<a href=\"##{@lineanchorsid}#{number}\">#{number}</a>"
end
end
numbers.join("\n") numbers.join("\n")
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