redcarpet icon indicating copy to clipboard operation
redcarpet copied to clipboard

Tabs again

Open vojtechkral opened this issue 10 years ago • 4 comments

Follow up to #153

  1. Is there really a reason why tabs need to be converted to spaces during preprocessing? I'm not sure I really understand the reasoning, especially when it comes to code blocks.

  2. If it really is necessary to replace tabs, could an option be provided that sets how many spaces per tab to replace?

vojtechkral avatar Jun 14 '15 19:06 vojtechkral

I too would love a tab-preserving option, regardless of the limitations it may place on the indentation requirements elsewhere in the file. I'm very particular about the types of indentation I use (typically, a mix of tabs and spaces for different circumstances), and so this is a huge paint point for me.

joesavage avatar Mar 11 '16 18:03 joesavage

Yeah, plus there are cases where you have to use tabs, such as Makefiles. As of now, inserting syntactically correct Makefiles is not possible.

vojtechkral avatar Mar 11 '16 18:03 vojtechkral

Same here.

I want to show a code block with tab-delimited content as an example of how users should format their data (in GitHub flavored markdown, which seems to be processed with redcarpet), and the conversion of tabs to spaces kinda defeats the purpose of this.

rmzelle avatar Mar 18 '16 15:03 rmzelle

Ok, well, I'm switching to kramdown. It's not out of spite or anything, I just need tabs...

vojtechkral avatar May 01 '16 15:05 vojtechkral