Support sass-embedded (#1112)

This commit is contained in:
なつき 2022-11-07 20:45:23 -08:00 committed by GitHub
parent dbc4ff6b52
commit 64f5a88542
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -7,7 +7,11 @@ module Haml
def self.render(name, source, indent_width: 0)
text = ::Tilt["t.#{name}"].new { source }.render
return text if indent_width == 0
text.gsub!(/^/, ' ' * indent_width)
if text.frozen?
text.gsub(/^/, ' ' * indent_width)
else
text.gsub!(/^/, ' ' * indent_width)
end
end
def explicit_require?(needed_registration)