code-syntax-block icon indicating copy to clipboard operation
code-syntax-block copied to clipboard

Annotation Error

Open ghost opened this issue 4 years ago • 5 comments

Hello, I have a problem using the plugin.

I have an error below —- when I use comments, how can I fix it?

1

ghost avatar Oct 20 '21 06:10 ghost

Testing out the same code above, setting to JavaScript and I'm not seeing the same issue.

image

What theme are you using for your WordPress site? What language is the code block set to?

mkaz avatar Oct 20 '21 18:10 mkaz

The theme I am using is Newspaper. And the language I am using is Java, but the same problem occurred when I tested in C language. I'll link to the page where the problem occurred.

https://keepmind.net/java-generic-programming/

ghost avatar Oct 21 '21 05:10 ghost

Hi, the link helped. The underline is due to the Newspaper theme CSS is adding

.comment {
  list-style: none;
  margin-left: 0;
  padding-bottom: 13px;
  border-bottom: 1px dashed #ededed;
  margin-bottom: 21px;
}

That probably should be more specific like .comments .comment { } However, you may not want to alter the theme, since you would lose any changes on any update.

If you can add some custom CSS, adding the following should fix:

.wp-block-code .comment {
    border-bottom: none;
}

I'll look at updating the plugin CSS to try to prevent themes CSS from bleeding in.

mkaz avatar Oct 21 '21 19:10 mkaz

Thank you very much for the quick reply. But I'm new to WordPress, so I don't quite understand the solution you mentioned. I tried deleting the .comment{ ... } part you mentioned and adding the .wp-block-code .comment { } part, but the problem still remains. Sorry to trouble you, but can you tell me how to do it?

ghost avatar Oct 22 '21 08:10 ghost

Ah, Problem Solved, Thank you!

ghost avatar Oct 23 '21 09:10 ghost