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

HTML-style comment causes RuntimeError #65

Closed
Tracked by #103
nabijaczleweli opened this issue Dec 8, 2020 · 3 comments
Closed
Tracked by #103

HTML-style comment causes RuntimeError #65

nabijaczleweli opened this issue Dec 8, 2020 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nabijaczleweli
Copy link
Contributor

nabijaczleweli@babtop:/tmp$ cat owo.md
There exists no other user-land tool for decrypting this. <!-- (TODO: make an LD_PRELOADable for extracting the key maybe) -->
nabijaczleweli@babtop:/tmp$ ronn owo.md
     roff: ./owo
Traceback (most recent call last):
        21: from /usr/bin/ronn:196:in `<main>'
        20: from /usr/bin/ronn:196:in `each'
        19: from /usr/bin/ronn:211:in `block in <main>'
        18: from /usr/bin/ronn:211:in `each'
        17: from /usr/bin/ronn:221:in `block (2 levels) in <main>'
        16: from /usr/lib/ruby/vendor_ruby/ronn/document.rb:243:in `convert'
        15: from /usr/lib/ruby/vendor_ruby/ronn/document.rb:248:in `to_roff'
        14: from /usr/lib/ruby/vendor_ruby/ronn/document.rb:248:in `new'
        13: from /usr/lib/ruby/vendor_ruby/ronn/roff.rb:18:in `initialize'
        12: from /usr/lib/ruby/vendor_ruby/ronn/roff.rb:95:in `block_filter'
        11: from /usr/lib/ruby/vendor_ruby/ronn/roff.rb:92:in `block_filter'
        10: from /usr/lib/ruby/vendor_ruby/nokogiri/xml/node_set.rb:237:in `each'
         9: from /usr/lib/ruby/vendor_ruby/nokogiri/xml/node_set.rb:237:in `upto'
         8: from /usr/lib/ruby/vendor_ruby/nokogiri/xml/node_set.rb:238:in `block in each'
         7: from /usr/lib/ruby/vendor_ruby/ronn/roff.rb:92:in `block in block_filter'
         6: from /usr/lib/ruby/vendor_ruby/ronn/roff.rb:124:in `block_filter'
         5: from /usr/lib/ruby/vendor_ruby/ronn/roff.rb:247:in `inline_filter'
         4: from /usr/lib/ruby/vendor_ruby/nokogiri/xml/node_set.rb:237:in `each'
         3: from /usr/lib/ruby/vendor_ruby/nokogiri/xml/node_set.rb:237:in `upto'
         2: from /usr/lib/ruby/vendor_ruby/nokogiri/xml/node_set.rb:238:in `block in each'
         1: from /usr/lib/ruby/vendor_ruby/ronn/roff.rb:247:in `block in inline_filter'
/usr/lib/ruby/vendor_ruby/ronn/roff.rb:305:in `inline_filter': unexpected node: #<Nokogiri::XML::Comment:0x2f8 " (TODO: make an LD_PRELOADable for extracting the key maybe) "> (RuntimeError)
@nabijaczleweli nabijaczleweli changed the title HTPM-style comment causes RuntimeError HTML-style comment causes RuntimeError Dec 8, 2020
@apjanke apjanke self-assigned this Dec 9, 2020
@apjanke apjanke added the bug Something isn't working label Dec 9, 2020
@apjanke
Copy link
Owner

apjanke commented Dec 9, 2020

Yep, that's a Ronn bug. Should be an easy fix.

@apjanke apjanke added this to the 0.10.0 milestone Dec 22, 2020
@apjanke
Copy link
Owner

apjanke commented Dec 22, 2020

Fixed in cbf6330, I think. HTML/XML comments are now ignored when producing roff output.

[ronn-ng] $ cat owo.md
There exists no other user-land tool for decrypting this. <!-- (TODO: make an LD_PRELOADable for extracting the key maybe) -->

[ronn-ng] $ bundle exec ronn owo.md
     roff: ./owo
     html: ./owo.html                                            +man
[ronn-ng] $ cat owo
.\" generated with Ronn-NG/v0.10.0
.\" http://github.com/apjanke/ronn-ng/tree/0.10.0-SNAPSHOT
.TH "OWO" "" "December 2020" ""
.SH "NAME"
\fBowo\fR
.P
There exists no other user\-land tool for decrypting this\.
[ronn-ng] $

Look good to you?

@apjanke apjanke closed this as completed Dec 22, 2020
@nabijaczleweli
Copy link
Contributor Author

Yes, that's what I'd expect it to behave like. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants