Markdown code blocks ignore tab width setting #8067
-
|
While the function foo() {
if (this.workedCorrectly()) {
i.wouldntSeeTabSizeEqualTo(8);
}
}even though my Tab size preference is set to 4. It would be even better if the markdown renderer took the root .editorconfig from the repo into consideration. |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 5 replies
-
|
this should've been tested when they added tab size to settings :/ I would like this too. for now, this custom css works for me: html {
tab-size: 4;
} |
Beta Was this translation helpful? Give feedback.
-
|
This also seems to be the case for markdown blocks in .md files, as can be seen on the preact project README: as it uses the same implementation (highlight.js). |
Beta Was this translation helpful? Give feedback.
-
|
@dipree Please take a look at this! |
Beta Was this translation helpful? Give feedback.
-
|
For anyone not willing to wait for Github to get around to this, install a CSS customization extension (say "Custom CSS by Denis") and then just set Will be applied globally and fix this till Github pushes a proper fix. |
Beta Was this translation helpful? Give feedback.
-
|
Still not fixed in March 2023... |
Beta Was this translation helpful? Give feedback.
-
|
Please fix this, I've literally never met anyone who prefers gigantic 8-char-wide tabs over 4-char or 2-char ones. TBH I don't know why they don't just change the default, other than that it's the browser default for some reason. |
Beta Was this translation helpful? Give feedback.
-
|
for so many years, this bug has forced me to use spaces in my readmes, so my code examples don't look stupid. in the time i've been patiently waiting for this fix, my boyish youth has faded, leaving me an aged, bitter, jaded husk of the potential i once had. thanks, github |
Beta Was this translation helpful? Give feedback.
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Hey everyone! I'm excited to announce that we've recently fixed this issue by making user-defined tab-width preferences consistent across GitHub (see changelog here). Feel free to test this out and drop a comment in our community discussion if you have any feedback or run into any issues. |
Beta Was this translation helpful? Give feedback.
-
|
Hello @michaldudak - could you please re-test the issue you reported and let us know if it’s been resolved? You can either leave a comment and close it out yourself, or if there’s no activity for 1–2 weeks, the system will automatically close it. Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
i converted my readme to tabs, and it revealed that github's codeblock rendering is actually broken. please see this example i made in this gist: https://gist.github.com/chase-moskal/0714c9b5e974f99162774d24524a099a github mangles codeblocks nested under bullet list items. not sure if this bug is new, or always existed. i'll also post about this in that new discussion |
Beta Was this translation helpful? Give feedback.

Hey everyone! I'm excited to announce that we've recently fixed this issue by making user-defined tab-width preferences consistent across GitHub (see changelog here). Feel free to test this out and drop a comment in our community discussion if you have any feedback or run into any issues.