question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Decoration for code span containing backtick is broken

See original GitHub issue

What is the problem?

Look at this markdown below:

```a`a```

This markdown text should be converted like below HTML

<code>a`a</code>

a`a

markdown-it recognize this correctly.

image

However, vscode-markdown recognize like below:

``<code>a</code>`a```

As a result, in editor view, decoration rectangle drawing result is strange.

img

How can I reproduce it?

  1. "markdown.extension.syntax.decorations": true
  2. create new markdown file
  3. paste
```a`a```

Environment

  • Windows 10 Home 1809
  • Visual Studio Code 1.31.0 or later
  • Markdown All in One 2.1.1

ref:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yzhang-ghcommented, Mar 23, 2019

I have disabled decorations in the fenced code blocks. However, I didn’t touch the indented code blocks. There are many corner cases if we want to perfectly determine the indented code blocks. I don’t think it is worth that effort.

1reaction
yzhang-ghcommented, Mar 18, 2019

The multi-line thing

This is the upstream issue. Bracket Pair Colorizer might have used some tricks (technically, we can fake multi-line decoration with multiple single-line decorations 😂). However, I am not a fan of this.


Decorations inside code blocks

Interesting. It is doable to disable decorations there. I can look into it this weekend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I escape a backtick ` within in-line code in Markdown?
Use four spaces before your code: List`1. Or use double backticks: ``List`1`` produces List`1 .
Read more >
function call is not working inside backticks in DOM javascript
Save this question. Show activity on this post. I called the function inside the backticks onclick of the input and lis and on...
Read more >
Stop rogue backtick from getting rendered - JavaScript - SitePoint ...
First post here, I hope I'll be doing everything right. I managed to get this function to work but there's an unwanted backtick...
Read more >
Topic: <a title=””> isn't working | WordPress.com Forums
To show the code you are pasting, use backticks before and after it. The backtick is the sort of backwards apostrophe on the...
Read more >
Markdown Syntax Documentation - Daring Fireball
To indicate a span of code, wrap it with backtick quotes ( ` ). Unlike a pre-formatted code block, a code span indicates...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found