Open RubenVerborgh opened 2 years ago
I accidentally had a structure
## h2 ### h3 ### h4
where the h3 was not being picked up because of a missing newline before.
It crashed as follows:
NoMethodError: undefined method `[]' for nil:NilClass sections_index[@reference_counts[document_sections[0]] - 1][:children][@reference_counts[document_sections[1]] - 1][:children][@reference_counts[document_sections[2]] - 1] = { :name => name, :id => id, :children => [] } ^^^^^^^^^^^ Current item: /index.md.erb (:default representation) 0. /Users/ruben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/scholarmarkdown-3.0.0/lib/scholarmarkdown/filter/labelify.rb:98:in `number_for' 1. ```
I accidentally had a structure
where the h3 was not being picked up because of a missing newline before.
It crashed as follows: