mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Is there a way to preserve Tab character inside code block?

Open duongdominhchau opened this issue 4 years ago • 1 comments

Question in the title. Currently the Tab character is converted into 4 spaces. I'm writing a code block demonstrating the behavior when Tab and Space indentations are mixed together, so I need the Tab to be kept as-is. Other than that, I think other weird languages will also benefit from this, for example Makefile requires the use of Tab.

Thank you all for a great tool, it helped me stopped procrastinating and start writing what I have planned for months.

duongdominhchau avatar Nov 14 '21 16:11 duongdominhchau

I have also encountered this problem. It is pretty bad that mdBook forces spaces. Some systems do not tolerate spaces for indentation, so I had to instruct my readers that the code samples are badly indented and I can do nothing about it.

meator avatar Feb 25 '24 08:02 meator