Skip to content
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
Closed

Kramdown sometimes emits warnings twice #492

gpakosz opened this issue Jan 31, 2018 · 3 comments
Assignees
Labels

Comments

@gpakosz
Copy link

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
Copy link
Owner

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
Copy link
Owner

I have fixed this - thanks for your report!

@gpakosz
Copy link
Author

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants