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

Syntax highlighting broken for inline code and admonition blocks #342

Open
Tracked by #686
themowski opened this issue Jul 1, 2020 · 1 comment
Open
Tracked by #686

Comments

@themowski
Copy link
Contributor

Description

I'm a long-time user of the original joaompinto.asciidoctor-vscode extension. With version 2.8.1 of this new extension, syntax highlighting does not properly display for inline code style, and the highlighting for admonition blocks is also different than past behavior. I traced the issue backward through to the old extension and found that the highlighting was fine until joaompinto.asciidoctor-vscode version 2.7.10. In that version, the syntax highlighting was updated, and this regression was introduced.

Previously, inline code with single or double backticks would render a different color than normal text, similar to bold/italic text. This is almost certainly expected behavior.

For admonition blocks, the delimiters & content were rendered in a different color than normal text. Now, there is no coloring at all for inline code, and while the title of an admonition block does render nicely, the block itself and delimiters are the same color as regular text. This makes it difficult to see block while scanning a document quickly, but in this case it is less clear what behavior is really expected.

Interestingly, this affects every built-in color theme except "Quiet Light", which can properly render the code snippets. Given that, perhaps this is also an issue with VS Code's color theme?

For what it's worth, inline code coloring is a big deal to me, and the admonition blocks are less of an issue.

System Information

Windows 10 Pro x64
VS Code 1.46.1 (just updated to the latest; also affected me on 1.43.1 before I updated)
Color theme: Monokai
Extension version 2.8.1

To Reproduce

Create an Asciidoc document with code or admonitions and save it so that syntax highlighting takes effect. Use any of the default color themes except "Quiet Light".

Screenshots & Files

This is a sample document highlighted with joaompinto.asciidoctor-vscode version 2.7.9. Notice the inline code & the admonition block highlighting.

2 7 9

Here is the same sample document highlighted with asciidoctor.asciidoctor-vscode version 2.8.1 (which looks the same as joaompinto.asciidoctor-vscode version 2.7.10). Notice that the inline code highlighting is gone and the admonition block is no longer rendered differently.

2 8 1

For completeness, here is a copy of the same document rendered with the "Quiet Light" theme. Notice that the inline code is colored correctly.

image

@joaompinto joaompinto self-assigned this Jul 1, 2020
@joaompinto
Copy link
Contributor

@themowski thanks for reporting. I will try to lake a look at it, we really are missing a test framework, specially in the syntax highlight because of it's many corner cases, many times we fix something by breaking something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants