-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Making it more clear where Request::setTrustedProxies should go #7619
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
Conversation
And trying out the diff format!
About the "diff + syntax highlighting" feature, I've only found this old article: https://blaxpirit.com/blog/1/diffs-with-syntax-highlight.html So it looks complicated to get it done with Pygments. |
I've opened a "feature request" in the Pygments repository about "diff + highlighting" --> https://bitbucket.org/birkenfeld/pygments-main/issues/1339/add-support-for-using-the-diff-lexer-code |
I like this proposal a lot, but currently it looks like this: However, given that red-green color blindness affect to 8% of people, I guess this will be confused by a mistake where we made a typo and put a I propose to change this to show the Another proposal for which I'm not sure would be to display a green/red background color on the changes, to make them stand out more: My vote would be yes to 1) and no to 2). What do others think? Thanks! |
I'm definitely 👍 for aligning left margin, and I'm also 👍 for the background color, looks more like a diff to me. |
I agree with @HeahDude! I like both the left margin align and the light green background (which obviously GitHub does - that's always a good source to follow). IF possible, it would be great to make the @javiereguiluz are you proposals possible? Or are we going to need to hack through some sphinx code to do this? |
Luckily we can do these changes just with CSS. Let's consider a GitHub diff as a reference: This is the default Pygments style: And this is the design that has been proposed to symfony.com private repo: We can't do the same as GitHub because the Pygment markup is not advanced enough to highlight the specific chars changed on each line. |
The changes in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Woohoo! That was quick work! Thanks! |
…uld go (weaverryan) This PR was merged into the 2.7 branch. Discussion ---------- Making it more clear where Request::setTrustedProxies should go ... And trying out the `diff` format! I know we lose the `php` formatting, but in this case, it seems superior. Commits ------- 869e5d2 Making it more clear where to add the Request::setTrustedProxies line
... And trying out the
diff
format! I know we lose thephp
formatting, but in this case, it seems superior.