Opened 14 years ago

Closed 14 years ago

#5901 closed bug (fixed)

Change <code> blocks on website to use 4 spaces per tab.

Reported by: stippi Owned by: haiku-web
Priority: normal Milestone:
Component: Website Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

The coding style guide explicitely mentions to use 4 spaces per tab, yet the examples are displayed with 8 spaces per tab on the website.

Change History (5)

comment:1 by nielx, 14 years ago

Resolution: invalid
Status: newclosed

Unfortunately several sources give the impression that this is impossible; a \t is interpreted as 8 spaces and this cannot be changed.

The workaround would be to reformat the tabs to four spaces, but then of course when copy-pasting it no longer conforms to the style guide.

comment:2 by koki, 14 years ago

Assuming that you are still using the Geshi Filter Module version 1.0.8.4, changing line 503 of geshi.php in the module directory from...

    var $tab_width = 8;

to

    var $tab_width = 4;

...will at least in theory change the tab stop size and most likely do the trick.

comment:3 by koki, 14 years ago

For the above change to work, you would also have to change the "Code container, wrapping technique" setting in admin/settings/geshifilter to use a <div> wrapper. I don't know if this would have any ramifications or not.

comment:4 by nielx, 14 years ago

Resolution: invalid
Status: closedreopened

Fixed: With the setting from comment:3 I was able to update it.

Last edited 14 years ago by nielx (previous) (diff)

comment:5 by nielx, 14 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.