zdavatz / ydocx

Parsing docx files with Ruby and output them as HTML
GNU General Public License v3.0
14 stars 8 forks source link

Test for nil needs to come first #2

Closed MadBomber closed 9 years ago

MadBomber commented 11 years ago

ruby-1.9.3-p429 [dewayne@fc18 0]$ docx2html 10019162.docx /home/dewayne/.rvm/gems/ruby-1.9.3-p429/gems/ydocx-1.2.3/lib/ydocx/templates/fachinfo.rb:109:in parse_title': undefined methodinner_text' for nil:NilClass (NoMethodError)

Change the line to read like this:

     ( node.parent.previous.nil?  or  node.previous.inner_text.strip.empty? )
zdavatz commented 11 years ago

can you send me a pull request?

MadBomber commented 11 years ago

my write up contained the file name. line number and the correction. that is sufficent.

Dewayne o-*

On May 22, 2013, at 8:25 PM, "Zeno R.R. Davatz" notifications@github.com wrote:

can you send me a pull request?

— Reply to this email directly or view it on GitHub.

zdavatz commented 11 years ago

Would be better if you send me a pull request. Then it is more official. Your name will then also appear in the commit.

zdavatz commented 9 years ago

Thank you @jhubert and @MadBomber.