New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kramdown sometimes emits warnings twice #492

Closed
gpakosz opened this Issue Jan 31, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@gpakosz

gpakosz commented Jan 31, 2018

I noticed that sometimes Kramdown emits warnings twice:

$ bundle show kramdown
/usr/local/lib/ruby/gems/2.4.0/gems/kramdown-1.16.2
irb(main):001:0> require 'kramdown'
=> true
irb(main):002:0> s = "This is a [link][with a missing id]"
=> "This is a [link][with a missing id]"
irb(main):003:0> ::Kramdown::Document.new(s).warnings
=> ["No link definition for link ID 'with a missing id' found on line 1", "No link definition for link ID 'with a missing id' found on line 1"]

@gettalong gettalong self-assigned this Feb 3, 2018

@gettalong

This comment has been minimized.

Owner

gettalong commented Feb 3, 2018

The reason for this is that the first warning comes from [link][missing] and the second from [missing]. I don't know if it makes to special case this in the parser.

@gettalong gettalong added enhancement bug and removed enhancement labels May 31, 2018

@gettalong

This comment has been minimized.

Owner

gettalong commented May 31, 2018

I have fixed this - thanks for your report!

@gettalong gettalong closed this May 31, 2018

gettalong added a commit that referenced this issue May 31, 2018

@gpakosz

This comment has been minimized.

gpakosz commented May 31, 2018

Thanks Thomas! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment