Skip to content

Incorrect highlighting with sbase print FILE.md if markdown had <code translate="no"> #2552

@mdmintz

Description

@mdmintz

Incorrect highlighting with sbase print FILE.md if markdown had <code translate="no">


Instead of the code part having the syntax-highlighting, the text after the code had the syntax highlighting.

It's a special edge-case because not all code tags are <code> and </code>. There's weird hack in place because https://pypi.org/project/rich/ doesn't highlight code with actual <code> tags around it. Only code wrapped with backticks gets syntax highlighting with rich. Eg: `code`.

This project's README.md file, (README.md), has <code translate="no"> in it, so that's how I found the issue after verifying rich 13.7.1, which just came out.

Metadata

Metadata

Assignees

Labels

bugUh oh... Something needs to be fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions