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

Auto add 4 ticks for suggestions when selected review contains ticks #1849

Open
SerratedSharp opened this issue Aug 4, 2024 · 2 comments
Open

Comments

@SerratedSharp
Copy link

If I click and drag multiple lines in a PR to create a Review, then choose to create a suggestion in the Review, then the prefilled block of code gets wrapped in a suggestion block:

```suggestion
code
```

However if "code" contains three ticks already, this won't work. You could automatically detect that the selected code contains a triple tick upon clicking the add Suggestion button, and use four ticks for the suggestion block, which will resolve the issue.

Copy link

github-actions bot commented Oct 3, 2024

Stale issue message

@SerratedSharp
Copy link
Author

I'll clarify this is more commonly a problem when doing PR reviews for documentation repos, as these are *.md files or contain markdown, so the likelhood of nested ticks is alot more common. On first encountering this, the resulting mangled output is very confusing, and if you don't know about the rule for using additional ticks on outer wrapping ticks, then the solution is non-obvious.

The other thing to note: This isn't me as a user making a mistake in hand coding markdown. This is a built-in Github functionality that generates the invalid PR review suggestion markdown.

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

No branches or pull requests

1 participant