Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I suggest multiple lines be changed in markdown

I first encountered on GitHub the "suggestion" code block, identified by

```suggestion
change
```

This offers to replace the line immediately before with what is inside the fence. But what about if I want to replace multiple lines?

I'd like to think this is possible, but I cannot find documentation of this feature anywhere. I have at least learned that the key terms to use are fenced code block and info string but the best I can come up with is that the info string (other than the first token) is unspecified.

Is this capability documented anywhere? It is emminently useful in code reviews.

Edit: This is a markdown question not a GitHub question

So far, it appears to be a GitHub-unique feature. That may be the answer, but telling me how to use the GitHub GUI is not addressing the question.

like image 825
jwm Avatar asked Feb 20 '20 00:02

jwm


People also ask

How do I suggest changes to GitHub pr?

In the list of pull requests, click the pull request you'd like to apply a suggested change to. Navigate to the first suggested change you'd like to apply. To apply the change in its own commit, click Commit suggestion. To add the suggestion to a batch of changes, click Add suggestion to batch.

How do I make a suggestion on GitHub?

In the files changed view on GitHub, select the line you want to make a suggestion like you would a regular comment. Right above the text box, simply click the first button that says Insert a suggestion . On the main page, it shows the suggested change and even has a way for the author to merge the change.

How do I mark multiple lines in GitHub?

click and hold to the right of a line number, drag and then release the mouse when you've reached the last line of the desired selection; or. click on a line number, hold Shift , click on a second line number and click the "+" button to the right of the second line number.

How do you insert a line break in markdown?

Line Breaks To create a line break or new line ( <br> ), end a line with two or more spaces, and then type return.


1 Answers

To add a comment on multiple lines, click and drag to select the range of lines, then click the blue comment icon.

enter image description here

like image 195
Kuncheria Avatar answered Oct 01 '22 18:10

Kuncheria