GithubHelp home page GithubHelp logo

Comments (11)

ssgelm avatar ssgelm commented on May 19, 2024

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

from ronn-ng.

deivid-rodriguez avatar deivid-rodriguez commented on May 19, 2024

Thanks @ssgelm for digging into it! This gem looks very promising if this is fixed! πŸŽ‰

from ronn-ng.

apjanke avatar apjanke commented on May 19, 2024

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.

from ronn-ng.

ssgelm avatar ssgelm commented on May 19, 2024

@apjanke Thanks for looking into it! Please let me know if I can help in any way.

from ronn-ng.

apjanke avatar apjanke commented on May 19, 2024

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 man on macOS.

Fixes the git-lfs man build failure for me, though I haven't inspected the resulting pages for correctness.

Before:

[~/local/repos/git-lfs]
$ make man                                                                                                     testing-ronn-ng
ronn  -r --pipe < docs/man/git-lfs-checkout.1.ronn > man/git-lfs-checkout.1
ronn  -r --pipe < docs/man/git-lfs-clean.1.ronn > man/git-lfs-clean.1
[...]
ronn  -r --pipe < docs/man/git-lfs.1.ronn > man/git-lfs.1
Traceback (most recent call last):
	23: from /usr/local/Cellar/ronn-ng/0.8.0/libexec/bin/ronn:23:in `<main>'
	22: from /usr/local/Cellar/ronn-ng/0.8.0/libexec/bin/ronn:23:in `load'
[...]
	 2: from /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.1/lib/nokogiri/xml/node_set.rb:238:in `block in each'
	 1: from /usr/local/Cellar/ronn-ng/0.8.0/libexec/gems/ronn-ng-0.8.0/lib/ronn/roff.rb:88:in `block in block_filter'
/usr/local/Cellar/ronn-ng/0.8.0/libexec/gems/ronn-ng-0.8.0/lib/ronn/roff.rb:165:in `block_filter': undefined method `position' for #<Nokogiri::XML::Element:0x00007fdf5990f048> (NoMethodError)
make: *** [man/git-lfs.1] Error 1

After:

[~/local/repos/git-lfs]
$ make man                                                                                    testing-ronn-ng
ronn  -5 --pipe < docs/man/git-lfs-checkout.1.ronn > man/git-lfs-checkout.1.html
ronn  -5 --pipe < docs/man/git-lfs-clean.1.ronn > man/git-lfs-clean.1.html
[...]
ronn  -5 --pipe < docs/man/git-lfs.1.ronn > man/git-lfs.1.html
[~/local/repos/git-lfs]
$

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 0.8.1.beta.1 release with this fix included. Can you test it out? Install with brew install ronn-ng --devel on macOS or gem install ronn-ng --pre on other platforms.

from ronn-ng.

apjanke avatar apjanke commented on May 19, 2024

@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 0.8.1.beta.1 gem and see if it's working for you under that?

from ronn-ng.

ssgelm avatar ssgelm commented on May 19, 2024

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.

from ronn-ng.

apjanke avatar apjanke commented on May 19, 2024

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).

from ronn-ng.

apjanke avatar apjanke commented on May 19, 2024

BTW, sorry for taking so long to respond to this bug report. I had food poisoning earlier this week. :(

from ronn-ng.

deivid-rodriguez avatar deivid-rodriguez commented on May 19, 2024

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!!

from ronn-ng.

apjanke avatar apjanke commented on May 19, 2024

This fix went out in version 0.8.1.

from ronn-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.