Skip to content
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

Use Kernel#format to render <img /> HTML tag #46

Merged
merged 2 commits into from
Feb 19, 2020

Conversation

ashmaroli
Copy link
Member

This change is to avoid converting the :attributes Hash into an Array and then into a String on every call to the :render method.

To facilitate this, the keys of the :attribute Hash are now Symbols.

Copy link
Collaborator

@benbalter benbalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Really elegant solution.


private_constant :BASE_ATTRIBUTES, :BASE_TEMPLATE, :LAZY_TEMPLATE

#
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a stray comment snuck in.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentionally placed to improve readability. But since you asked about it, I guess it is more of a distraction instead.

@benbalter benbalter merged commit c0cf216 into jekyll:master Feb 19, 2020
@ashmaroli ashmaroli deleted the string-templates branch February 20, 2020 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants