mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05: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
1 changed files with 7 additions and 4 deletions
|
@ -63,11 +63,14 @@ class DiscourseSassCompiler
|
|||
|
||||
# Check if CSS needs to be RTLed after compilation
|
||||
# and run RTLit gem on compiled CSS if true and RTLit gem is available
|
||||
if GlobalSetting.rtl_css && defined?(RTLit)
|
||||
RTLit::Converter.to_rtl(css)
|
||||
else
|
||||
css
|
||||
css_output = css
|
||||
if GlobalSetting.rtl_css
|
||||
begin
|
||||
require 'rtlit'
|
||||
css_output = RTLit::Converter.to_rtl(css) if defined?(RTLit)
|
||||
rescue; end
|
||||
end
|
||||
css_output
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue