I know you can go to the files section of a PR and click to add a comment that references code. But is there any markdown or other method that lets you add a reference to some code in the replies to comments?
note: I mean referencing code from a file, not just pasting in the code. I'd like the code to update dynamically similar to code referenced when creating a comment with a file/line reference.
Here is a statement in Syntax guidance for basic Markdown usage:
Note: Code attachments aren't permitted in PR comments
So I am afraid it is not support in Markdown.
You can try to click the "Copy link to this selection" option for a piece of code in a file and then insert the generated link into the comment reply to achieve the reference.