Skip to content

How do I add back-ticks within a GitHub suggestion and not have it escape the suggestion scope? #1687

@ahsonkhan

Description

@ahsonkhan

Imagine I am leaving a comment on a line which has just the following three back-ticks (in my scenario, the markdown file contains a yaml component which has three back ticks):

```

I want to leave the suggestion within a comment while doing code review, so the final markdown looks like:

```
Added new lines and content here, with more back-ticks ```

How can I do that, so the back-ticks are escaped? Using 4 back-ticks doesn't work, and neither does something like "\`".

I was hoping something like this would work, but that doesn't give the intended outcome:

```suggestion
```
Added new lines and content here, with more back-ticks ```
```

Here's a concrete, real life example:
image

Here's what I end up seeing in preview which isn't what I want. I don't want to suggest removing the line with the three back-ticks, I want the suggestion to add more lines after the back-tick, and those suggested new lines include back-ticks themselves.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions