Skip to content

Instantly share code, notes, and snippets.

@chase-moskal
Last active July 30, 2025 01:37
Show Gist options
  • Select an option

  • Save chase-moskal/0714c9b5e974f99162774d24524a099a to your computer and use it in GitHub Desktop.

Select an option

Save chase-moskal/0714c9b5e974f99162774d24524a099a to your computer and use it in GitHub Desktop.
demo of a github markdown rendering bug

this is a demonstration of a bug in github's markdown rendering with tabs.. in code blocks nested under bullets, lines are rendered with an extra leading space character..

bullet list

  • ❌ yukon
     alpha
     	alpha
     		alpha
     	alpha
     alpha
    
    • ❌ british columbia
       bravo
       	bravo
       		bravo
       	bravo
       bravo
      

number list

  1. ✅ washington
    charlie
    	charlie
    		charlie
    	charlie
    charlie
    
    1. ✅ oregon
      delta
      	delta
      		delta
      	delta
      delta
      

hybrid number/bullet

  1. ✅ baja california
    echo
    	echo
    		echo
    	echo
    echo
    
    • ❌ sonora
       foxtrot
       	foxtrot
       		foxtrot
       	foxtrot
       foxtrot
      
@ioquatix
Copy link

Great visual.

@iwoodroroo
Copy link

I don't get it

@chase-moskal
Copy link
Author

@iwoodroroo

i'll try to explain this more clearly:

if you are using tabs for indentation in a markdown github readme (which is nice because, with tabs, the indents are now displayed in accordance with the user's own preferences) — the problem is that there is a bug on github, where the text in some codeblocks is actually mangled — unwanted spacebar characters are inserted into the codeblock where none exist in the markdown source — this will cause confusing failures when somebody copy-and-pastes code snippets, because some programming languages require strictly correct indentation.

for more context, see this community discussion, and this one too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment