WordPress bug with highlighting lines in a code block

I discovered a bug. When you use the highlight lines property for code blocks as shown here…

Here, on the right, you see the “Highlight lines” property.

…the highlighting for the higher line numbers gets confused, as shown with lines 27, 39, 60 in the following screenshot.

Here, you see the highlighting on lines 27, 39, and 60 is wrong.

I’ve reached out to WordPress support and will let you know how it goes. I’ll try to file a bug for this.

[UPDATE] A WordPress happiness engineer created the following issue, which does an excellent job of analyzing and describing the problem: https://github.com/Automattic/wp-calypso/issues/50577

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s