rouge icon indicating copy to clipboard operation
rouge copied to clipboard

Tab indentation width

Open konsolebox opened this issue 3 years ago • 2 comments

Hello, is there a way to customize the displayed width of tabs to 4 spaces? If not, where is the best place to add the custom behavior?

konsolebox avatar May 14 '22 17:05 konsolebox

@konsolebox Sorry I don't really get the context of your question 🙏🏼 Could you elaborate a bit more?

tancnle avatar May 18 '22 12:05 tancnle

Thanks for the reply. I utilize Jekyll to generate pages with highlighting enabled. Tabs in highlighted code become displayed in browsers with a width of 8 spaces but I want to reduce it to 4, like having a .editorconfig with indent_size = 4 in a github repository so code with tabs are rendered in 4-spaced indents.

I can write a Jekyll plugin which extends Rouge if Rouge doesn't have this feature yet but I'll need basic directions.

konsolebox avatar May 18 '22 18:05 konsolebox

It turns out Github simply uses tab-size. It's pretty odd how I missed it. I'll just close this.

konsolebox avatar Nov 25 '22 05:11 konsolebox