remove indentation in all code blocks in markdown files
See original GitHub issueWe use padding for first level indentation in code block since this PR got merged.
For example consider this codeblock:
```dvc
$ pip install gitpython
$ pip install git+git://github.com/iterative/dvc
```
Output

Expected Output

This can be fixed by removing the unnecessary 4 spaces indentation we have given under every code block.
Since there are a lot of files, I recommend a smart way to fix it. For example a bash script could be made to run over all .md files and remove the indentation.
Keep in mind that we don’t have to completely remove indentation. Just the first level. For example:
```js
function sum(a, b) {
return a+b
}
```
converts to:
```js
function sum(a, b) {
return a+b
}
```
not this:
```js
function sum(a, b) {
return a+b
}
```
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How do I remove excess indentation on my code blocks?
For reasons previously unbeknownst to me, the same keyboard shortcut that you use to format unformatted code as Markdown code blocks ( Ctrl ......
Read more >Automatic removal of indent in markdown (fenced) codeblock ...
When typing '#' as the first character in a new line, the indent for that line is removed, the '#' is put in...
Read more >We should abandon indented code blocks - Spec
Overall, if indented code blocks go away, Markdown can become completely indentation-agnostic, where the only real requirement is that following ...
Read more >Indenting without changing text to a code block
I have noticed a couple of workaround. Indenting with 1-3 spaces will indent without destroying links, and indenting a paragraph separated ...
Read more >Extended Syntax - Markdown Guide
The basic Markdown syntax allows you to create code blocks by indenting lines by four spaces or one tab. If you find that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

hi, @ryokugyu ! That would be great. Thank you. I’ll assign it to myself to lock the issue. Feel free to proceed with it.
Fixed by @ryokugyu .