8000 Use the rails template path as filename by gucki · Pull Request #1140 · haml/haml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use the rails template path as filename #1140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/haml/rails_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ def call(template, source = nil)
source ||= template.source
options = RailsTemplate.options

# Make the filename available in parser etc.
if template.respond_to?(:identifier)
options = options.merge(filename: template.identifier)
end

# https://github.com/haml/haml/blob/4.0.7/lib/haml/template/plugin.rb#L19-L20
# https://github.com/haml/haml/blob/4.0.7/lib/haml/options.rb#L228
if template.respond_to?(:type) && template.type == &# 413C 39;text/xml'
Expand Down
0