emgithub
emgithub copied to clipboard
Strip unnecesarry indentation from code snippets
When code snippets are linked that are inside a function (or maybe even a few blocks of logic) we get output like:
<space><space><space><space>foo =8;
instead of:
foo =8;
Which leads to ugly snippets that show a scrollbar when its not necessary etc. etc. Instead we should just figure out the indentation level of the code from the first line and then strip that much indentation from any subsequent lines.