معاينة Github مع الروابط يجب أن يعاين الرابط بدلاً من أعلى الملف

When you link a Github file with an anchor, the preview which Discourse renders is of the top of the file rather than from the anchor on.

See for instance:

This should preview show the development section, not the top of the readme.

(Not sure whether this is actually a bug.)

3 إعجابات

I’ve added a pr-welcome here if you’d like to help improve this. :slight_smile:

إعجاب واحد (1)

I reviewed this PR and noticed that Discourse attempts to serve content directly from the repository using https://raw.githubusercontent.com , which provides a plain, unstyled raw file (e.g., https://raw.githubusercontent.com/discourse/discourse/main/README.md#development ). For line-specific references (like #L-{line-number} ), it jumps directly to the specified line in the file to display the content. To preview a specific section (e.g., #development , #requirements ), you can specify the line number as shown below:

إعجاب واحد (1)