SwedbankPay / kramdown-plantuml

PlantUML support for Kramdown, the Markdown parser used in Jekyll
https://rubygems.org/gems/kramdown-plantuml
Apache License 2.0
8 stars 2 forks source link

DX-914: Fix nil key #76

Closed asbjornu closed 2 years ago

asbjornu commented 2 years ago

Fix for when the :plantuml key is nil to avoid the following error:

/usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/options.rb:61:in `extract_raise_errors': undefined method `key?' for nil:NilClass (NoMethodError)
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/options.rb:14:in `initialize'
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/jekyll_provider.rb:94:in `new'
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/jekyll_provider.rb:94:in `replace_needle'
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/jekyll_provider.rb:85:in `block in replace_needles'
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/jekyll_provider.rb:83:in `gsub'
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/jekyll_provider.rb:83:in `replace_needles'
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/jekyll_provider.rb:71:in `block (2 levels) in register_hook'
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/jekyll_provider.rb:70:in `each'
    from /usr/gem/ruby/2.7.0/gems/kramdown-plantuml-1.1.10/lib/kramdown-plantuml/jekyll_provider.rb:70:in `block in register_hook'
codecov[bot] commented 2 years ago

Codecov Report

Merging #76 (e9441c3) into main (26cdcb6) will increase coverage by 0.46%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
+ Coverage   94.01%   94.48%   +0.46%     
==========================================
  Files          12       12              
  Lines         418      417       -1     
==========================================
+ Hits          393      394       +1     
+ Misses         25       23       -2     
Impacted Files Coverage Δ
lib/kramdown-plantuml/options.rb 100.00% <100.00%> (+3.92%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 26cdcb6...e9441c3. Read the comment docs.

mergify[bot] commented 2 years ago

Thank you @asbjornu for your contribution!