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

Possibly erroneous warning by the parser for the generated markdown? #766

Open
rubyFeedback opened this issue Sep 4, 2022 · 1 comment
Assignees
Labels

Comments

@rubyFeedback
Copy link

I got this error message recently:

Warning: Found invalidly used HTML closing tag for 'b' on line 1866

I opened that file via vim and +1866 which I think jumps to the line.

The line at hand was:

The file <b>examples/complex/016_grid_example.rb</b> shows
this new API, mixed with the old, original API.

This is documentation for one of my gems. I use a README.gen
file to generate a README.md, using some scripts and macros.

I believe the line should work though. Not sure why kramdown
complains.

kramdown version is using: 2.4.0

Anyway, could you add the above to a test for kramdown perhaps?
Perhaps I made a mistake, but either way I'll report it here.

I am receiving some warnings in other projects. At some later
point I may give you a more thorough analysis of the
warnings kramdown generates - which is super-useful but
sometimes confusing too. Perhaps kramdown could also
show some more information or so, a bit like the
did-you-mean gem.

@gettalong gettalong self-assigned this Sep 4, 2022
@gettalong gettalong added the bug label Sep 4, 2022
@gettalong
Copy link
Owner

I can confirm that the warning is issued and that it is wrongly issued.

The reason for this is that the <b> gets parsed and put onto the parse stack. When the _grid_ part is seen, the parser thinks it is an emphasis and tries to parse it, then comes across the </b> which it thinks is invalid (and would be so if the emphasis was correct). When it later determines that the emphasis is invalid, parsing continues at the grid_ part and later the </b> is found and correctly used.

Will need to think about how to tackle this.

nuclearsandwich added a commit to ros-infrastructure/answers-archive that referenced this issue Mar 29, 2024
kramdown seems to be having issues with certain HTML elements.
I was specifically hung up on gz/question/132 but it seems to be a known
issue gettalong/kramdown#766
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