nori icon indicating copy to clipboard operation
nori copied to clipboard

does not work with plain tags and whitespace

Open arjunmenon opened this issue 9 years ago • 0 comments

I have a tag set like this

irb(main):001:0> tagged = <vb>Tell</vb> <prp>me</prp> <det>the</det> <jj>current</jj> <nn>temperature</nn>

irb(main):002:0> parser = Nori.new.parse(tagged)
=> {"vb"=>"Tell"}

It does not parse the other tags.

If I remove the whitespace it still returns the same result and if the parser is set to REXML

irb(main):014:0> parser = Nori.new(:parser => :rexml)
=> #<Nori:0x81c956b8 @options={:strip_namespaces=>false, :delete_namespace_attributes=>false, :convert_tags_to=>nil, :convert_attributes_to=>nil, :empty_tag_value=>nil, :advanced_typecasting=>true, :convert_dashes_to_underscores=>true, :parser=>:rexml}>
irb(main):015:0> parser.parse('<vb>Tell</vb><prp>me</prp><det>the</det><jj>current</jj><nn>temperature</nn>')
=> {"vb"=>"Tell<prp>me</prp><det>the</det><jj>current</jj><nn>temperature</nn>"}

It simply not returning the expected hash.

arjunmenon avatar Dec 04 '16 07:12 arjunmenon