-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Add inspect filter #2850
Add inspect filter #2850
Conversation
The test seems to be failing on something irrelevant https://travis-ci.org/jekyll/jekyll/builds/33869200 |
This is pretty cool. I still like |
@parkr Thanks, renamed! |
# | ||
# Returns a YAML representation of the object. | ||
def inspect(input) | ||
CGI.escapeHTML(input.to_yaml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not input.inspect
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again I was basing off Rails's debug
and thought that to_yaml
would have richer information. But if inspect
suffices, will change to it.
Also if you rebase on the latest |
For #2814 - I opted out for
debug
instead ofinspect
to mimic thedebug
helper method in Rails (their implementation). It also escapes HTML tags.Usage:
Output: