Joined July 2014
·

Cornelius

Utica, NY
·
·

huh. Nice work, coderwall. The second part of that comment, slightly modified, should read:

That's it. All the real content of the page, which is available if I just print 'page.body' straight up, is in a div which is sibling to the nav, and doesn't show up. (This first-child-only problem persists no matter what element I print; it's not specific to the div).

Would love to get your thoughts on either of these issues ...

Yes! Thank you, Matt -- I need this about six hundred times a day. There should definitely be a pry plugin for this; it's far more convenient than launchy for most tasks. This almost works great, but for two issues:

1) Would be nice if the output went through the pry pager. After several minutes of fiddling I gave up trying to do that. (Pry has a Pry.pager method, but it just returns 'true' -- I'm not sure how to actually access the pager and use it.)

2) For some reason the output of the html5tidy command shows me only the first child of any element. For instance, when I run 'html5tidy page.body', I get

<html>
<head>
<title/>
<body>
<nav id="navbar-top" role="navigation">
<ul>
<li class="active">
<a href="/surveys">surveys</a>
</li>
<li>
<a href="/users">users</a>
</li>
</nav>
</body>
</head>
</html>

That's it. All the real content of the page, which is available if I just print 'page.body' straight up, is in a <div class="container"> which is sibling to the nav, and doesn't show up. (This first-child-only problem persists no matter what element I print; it's not specific to <div class="container">).

Would love to get your thoughts on either of these issues ...

Achievements
1 Karma
0 Total ProTip Views