Still seeing nil pointer exception in squeeze on MLA
Same problem as #88. But this occurs even after upgrading to 2.1.2
On this line: https://github.com/inukshuk/citeproc-ruby/blob/master/lib/citeproc/ruby/format.rb#L81
NoMethodError: undefined method 'end_with?' for nil squeezable?(c) && string.end_with?(suffix[0, i + 1]) ^^^^^^^^^^
suffix = suffix.each_char.drop_while.with_index { |c, i|
squeezable?(c) && string.end_with?(suffix[0, i + 1])
}.join('')
In 2.1.2, it did fix the case where publisher was <[Arhiv Kosova]>, but it does not fix the case where publisher is <Narodni muzej>
I think in this case you should encode angle braces with < and > before rendering using the HTML formatter. With content like this you could run into issues when processing the result even if we make the squeeze function not fail. If I remember correctly, it's difficult to do this in the processor because there are cases where you legitimately have HTML or XML tags in the content and you're rendering out HTML/XML.
@inukshuk I agree with that. It turns out this is some markup from the (somewhat obsolete) AACR2 (https://www.librarianshipstudies.com/2018/12/anglo-american-cataloguing-rules-aacr.html). I will be stripping this off because the consumers here are not aware of these rules. However, it would be best if it didn't crash.