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

List item inside annotation is rendering into a different annotation. #5496

Closed
4 tasks done
feasgal opened this issue May 9, 2023 · 3 comments
Closed
4 tasks done
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@feasgal
Copy link

feasgal commented May 9, 2023

Context

No response

Bug description

I have a sentence with two annotations in it. The first annotation includes an unordered list of three items. The second annotation is a single sentence.

The first annotation is rendering with the second unordered list item blank, and the second annotation's content is replaced by the text of that missing list item.

UPDATE:

  • Upon further testing, this happens with ordered and unordered lists, and it happens whether I use markdown syntax for the lists, or insert raw HTML in the annotation.
  • In the <ol hidden> that appears after the paragraph in the page source, the second <li> has not been stripped like the first one has.
  • All of which leads me to believe it's something about the way the popup in the block with the .annotate class is rendered from the ordered list of annotations below it that gets hidden in the final page display.

Related links

Reproduction

untitled folder.zip

Steps to reproduce

MkDocs version: 1.4.2
Material version: 9.1.1+insiders.4.32.2

Here's the markdown code:

A sentence with an annotation (1) and a second annotation (2). 
{ .annotate }

1.	The beginning of the first annotation, which includes a:
	
	-	list
	-	of
	-	items
	
	Plus another sentence.
	
2.	Here's the second annotation.

But the two annotations are rendering like this:
image

And this:
image

I'm baffled.

Browser

No response

Before submitting

@feasgal feasgal changed the title Unordered list in annotation is rendering into a different annotation. List item inside annotation is rendering into a different annotation. May 9, 2023
@squidfunk squidfunk added needs investigation Issue must be investigated by the maintainers bug Issue reports a bug and removed needs investigation Issue must be investigated by the maintainers labels May 10, 2023
@squidfunk
Copy link
Owner

Thanks for reporting! Fixed in 43c30522a. The problem was that the selector to find the respective lists was not specific enough, so the list inside the code annotation was mistaken for being the annotation content.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label May 12, 2023
@squidfunk
Copy link
Owner

Released as part of 9.1.12+insiders-4.33.2.

@feasgal
Copy link
Author

feasgal commented May 12, 2023

Wow, what a quick turn-around! It works as expected now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants