Repository: markdownlint/markdownlint

Issue #93: NoMethodError when linting
Created: 2015-06-06T15:30:28Z
Here is the error i got:
/var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl/doc.rb:222:in `block (2 levels) in matching_text_element_lines': undefined method `+' for nil:NilClass (NoMethodError)
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl/doc.rb:221:in `each'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl/doc.rb:221:in `each_with_index'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl/doc.rb:221:in `block in matching_text_element_lines'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl/doc.rb:218:in `each'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl/doc.rb:218:in `matching_text_element_lines'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl/rules.rb:461:in `block (2 levels) in load'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl.rb:71:in `call'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl.rb:71:in `block (2 levels) in run'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl.rb:69:in `each'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl.rb:69:in `block in run'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl.rb:59:in `each'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/lib/mdl.rb:59:in `run'
    from /var/lib/gems/2.1.0/gems/mdl-0.2.1/bin/mdl:10:in `<top (required)>'
    from /usr/local/bin/mdl:23:in `load'
    from /usr/local/bin/mdl:23:in `<main>'

Here is the markdown I am trying to lint:
* [Body language, the power is in the palm of your hands | Allan Pease](https://www.youtube.com/watch?v=ZZZ7k8cMA-4)

Duplicate issue #97: MD034 crashes for link description with pipe char "|"
Created: 2015-07-11T23:55:17Z
This text in a markdown doc (note the pipe char in the link description):
See [|here](http://www.example.com) for more info.

results in a crash:
[...]
Processing rule MD034
/home/alexander/dev/markdownlint/lib/mdl/doc.rb:222:in `block (2 levels) in matching_text_element_lines': undefined method `+' for nil:NilClass (NoMethodError)
    from /home/alexander/dev/markdownlint/lib/mdl/doc.rb:221:in `each'
    from /home/alexander/dev/markdownlint/lib/mdl/doc.rb:221:in `each_with_index'
    from /home/alexander/dev/markdownlint/lib/mdl/doc.rb:221:in `block in matching_text_element_lines'
    from /home/alexander/dev/markdownlint/lib/mdl/doc.rb:218:in `each'
    from /home/alexander/dev/markdownlint/lib/mdl/doc.rb:218:in `matching_text_element_lines'
    from /home/alexander/dev/markdownlint/lib/mdl/rules.rb:461:in `block (2 levels) in load'
    from /home/alexander/dev/markdownlint/lib/mdl.rb:71:in `call'
    from /home/alexander/dev/markdownlint/lib/mdl.rb:71:in `block (2 levels) in run'
    from /home/alexander/dev/markdownlint/lib/mdl.rb:69:in `each'
    from /home/alexander/dev/markdownlint/lib/mdl.rb:69:in `block in run'
    from /home/alexander/dev/markdownlint/lib/mdl.rb:59:in `each'
    from /home/alexander/dev/markdownlint/lib/mdl.rb:59:in `run'
    from /home/alexander/dev/markdownlint/bin/mdl:10:in `<top (required)>'
    from /home/alexander/.rvm/gems/ruby-2.1.2/bin/mdl:23:in `load'
    from /home/alexander/.rvm/gems/ruby-2.1.2/bin/mdl:23:in `<main>'
    from /home/alexander/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
    from /home/alexander/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>

This seems like a weird edge case but I thought I should report it nonetheless :)

Closing comment (2015-07-12T00:03:53Z): Sorry, should've looked through the issues list first, looks like a dupe of #93.