mirror of
https://github.com/discourse/discourse.git
synced 2025-04-17 04:49:02 +08:00
ensure RTLit gem is included and CSS is RTLed if css_rtl is enabled in discourse config
This commit is contained in:
parent
6ba4243b3e
commit
c99ab7fb06
@ -63,11 +63,14 @@ class DiscourseSassCompiler
|
|||||||
|
|
||||||
# Check if CSS needs to be RTLed after compilation
|
# Check if CSS needs to be RTLed after compilation
|
||||||
# and run RTLit gem on compiled CSS if true and RTLit gem is available
|
# and run RTLit gem on compiled CSS if true and RTLit gem is available
|
||||||
if GlobalSetting.rtl_css && defined?(RTLit)
|
css_output = css
|
||||||
RTLit::Converter.to_rtl(css)
|
if GlobalSetting.rtl_css
|
||||||
else
|
begin
|
||||||
css
|
require 'rtlit'
|
||||||
|
css_output = RTLit::Converter.to_rtl(css) if defined?(RTLit)
|
||||||
|
rescue; end
|
||||||
end
|
end
|
||||||
|
css_output
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user