jekyll: Build: Kramdown warnings do not display document relative path
Related: #6522
Given I am on the `master` branch of this repo
When I run `bundle exec jekyll rake:preview`
Then the following warnings are displayed:
Kramdown warning: No link definition for link ID '#1339' found on line 2
Kramdown warning: No link definition for link ID '' found on line 2
Kramdown warning: No link definition for link ID '#1338' found on line 3
Kramdown warning: No link definition for link ID '' found on line 3
Kramdown warning: No link definition for link ID 'docs' found on line 150
Kramdown warning: No link definition for link ID 'rubocop' found on line 260
Kramdown warning: No link definition for link ID '"permalink"' found on line 299
Kramdown warning: No link definition for link ID 'site' found on line 375
Kramdown warning: No link definition for link ID 'docs' found on line 437
Kramdown warning: No link definition for link ID 'docs' found on line 580
Kramdown warning: No link definition for link ID 'docs' found on line 583
Kramdown warning: No link definition for link ID 'docs' found on line 592
Kramdown warning: No link definition for link ID 'add note' found on line 926
Kramdown warning: No link definition for link ID '' found on line 1002
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Kramdown warning: Warning: this should not occur - no block parser handled the line
Expected output
Kramdown: No link definition for link ID '' found on line 1002 in /_docs/configuration.md
/cc @jekyll/build
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 23 (23 by maintainers)
Thank you for checking this with the website @DirtyF , i should have already done that in #6522 😞 I assume without file names these warnings are not much helpful to the users.
I like this idea 👍 We can check this somewhere here and apply the filename as with any other warnings.
@ashmaroli Right. Forgot about jekyll-feed. Thanks for doing that digging.
@ashmaroli Look at the failing tests to see why.
If you just remove that line, the
smartify
filter will wrap all output in a<p>
tag, which is Bad and Wrong.If you replace the line with
@block_parsers = []
, the filter will try to escape HTML tags:"<div>" => "<div>"
, which is wrong.We are subclassing
Kramdown::Parser::Kramdown
as is the correct way to build a custom processor.https://github.com/gettalong/kramdown/blob/a8375683c2873d09a24be53594056199725e068e/lib/kramdown/parser/kramdown.rb#L23-L28
I am guessing that either there is an option somewhere that we need to flip, or this is a bug in kramdown.
https://github.com/gettalong/kramdown/blob/78120ea7cd41ec7e056fa30d563c961add0c3b1a/lib/kramdown/parser/kramdown.rb#L153
The first two warnings are related to this post where references are defined in a Liquid
for
loop.