-
Notifications
You must be signed in to change notification settings - Fork 16
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
undefined method `position' for #<Nokogiri::XML::Element:0x0000000002465008> (NoMethodError) #24
Comments
I ran into this also with git-lfs and it appears to be caused by having a numbered list. Any man pages without one work fine. Here's a really simple one that worked before but now fails: test
====
## SYNOPSIS
1. Test |
Thanks @ssgelm for digging into it! This gem looks very promising if this is fixed! 🎉 |
Thanks for the report! Prioritizing this bug since it's causing problems for Debian. Looks like this could be a leftover bug from the hpricot-to-Nokogiri migration. |
@apjanke Thanks for looking into it! Please let me know if I can help in any way. |
This was indeed an hpricot-to-Nokogiri migration bug. It looks like one of those fabled one-line fixes: e91949f#diff-8c2a2b56f00218c211ba4fc3ed93077c This fix won't fix all ordered list rendering: in particular, I don't know whether nested ordered lists are working well. But it fixes this regression and gets Ronn-NG back to what the original Ronn supported. And should get your man pages building. I added an ordered list test to Ronn-NG's test suite, and the results look good to me, based on manual inspection and viewing under Fixes the Before:
After:
This fix justifies a patch release since the problem is affecting end users and especially because it's a regression from original Ronn. I've pushed out an |
@deivid-rodriguez I think I've got this fixed for you, but I'm not enough of a Ruby wizard to get the bundler man page build working with the ronn-ng gem. Could you test it against the ronn-ng |
Seems to work for me. I diffed the old and new man pages and there seem to be some slight differences but none that cause obvious visual differences so I think it's fine. |
Great. Yeah, the ROFF output isn't going to be byte-for-byte identical between Ronn and Ronn-NG – in particular, I've removed what I considered to be excess non-significant whitespace that hindered readability for experienced ROFF users (who are the only folks that should be reading raw ROFF files ;) ) – but it should render the same (in most cases) or “better” (in the case of nested lists or some other indented constructs). |
BTW, sorry for taking so long to respond to this bug report. I had food poisoning earlier this week. :( |
Tried it and it worked just fine! As @ssgelm pointed out, I also diffed the generated man pages and they show minor changes that don't seem to make any visual difference. So this seems fixed, thanks!! |
This fix went out in version 0.8.1. |
In order to generate
bundler
's man pages, we currently use theronn
gem. However, this gem and its dependencies have not been updated for years, and just now I found out that they started segfaulting in some situations.I tried replacing
ronn
withronn-ng
. It did generate some man pages (didn't check correctness, but it didn't crash), but it ended up crashing with the following errorIn order to reproduce, you can clone bundler, replace the
ronn
development dependency withronn-ng
, and then runbin/rake spec:deps
followed bybin/rake man:build
.Thanks!
The text was updated successfully, but these errors were encountered: