mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 05:22:23 +00:00
lint
This commit is contained in:
parent
8e29500fcf
commit
f64c91801e
@ -39,7 +39,7 @@ module Tartrazine
|
|||||||
lines = group_tokens_in_lines(lexer.tokenize(text))
|
lines = group_tokens_in_lines(lexer.tokenize(text))
|
||||||
output = String.build do |outp|
|
output = String.build do |outp|
|
||||||
if surrounding_pre?
|
if surrounding_pre?
|
||||||
pre_style= wrap_long_lines? ? "style=\"white-space: pre-wrap; word-break: break-word;\"" : ""
|
pre_style = wrap_long_lines? ? "style=\"white-space: pre-wrap; word-break: break-word;\"" : ""
|
||||||
outp << "<pre class=\"#{get_css_class("Background", theme)}\" #{pre_style}>"
|
outp << "<pre class=\"#{get_css_class("Background", theme)}\" #{pre_style}>"
|
||||||
end
|
end
|
||||||
"<code class=\"#{get_css_class("Background", theme)}\">"
|
"<code class=\"#{get_css_class("Background", theme)}\">"
|
||||||
|
@ -17,7 +17,7 @@ module Tartrazine
|
|||||||
raise ex unless ex.message.try &.includes? "Theme not found"
|
raise ex unless ex.message.try &.includes? "Theme not found"
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
return Theme.from_xml(ThemeFiles.get("/#{name}.xml").gets_to_end)
|
Theme.from_xml(ThemeFiles.get("/#{name}.xml").gets_to_end)
|
||||||
rescue
|
rescue
|
||||||
raise Exception.new("Theme #{name} not found")
|
raise Exception.new("Theme #{name} not found")
|
||||||
end
|
end
|
||||||
@ -187,9 +187,9 @@ module Tartrazine
|
|||||||
return Color.new(127, 127, 127)
|
return Color.new(127, 127, 127)
|
||||||
end
|
end
|
||||||
if base_color.dark?
|
if base_color.dark?
|
||||||
return base_color.lighter(0.2)
|
base_color.lighter(0.2)
|
||||||
else
|
else
|
||||||
return base_color.darker(0.2)
|
base_color.darker(0.2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user