Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The default indentation seems to be 8. How to change it?
Comment | File | Size | Author |
---|---|---|---|
#3 | 1831180.patch | 2.79 KB | yukare |
|
Comments
Comment #1
soxofaan CreditAttribution: soxofaan commentedIf you use the PRE container, tabs are preserved in the markup and handled by the browser. You can control this tab width with css (e.g.
tab-size: 4;
), but this is not supported by all browsers.If you use another container, the GeSHi library replaces tabs with spaces, eight by default. It is possible to change the tab width, but this is not supported currently by the GeSHi filter for syntax highlighting module.
Comment #2
yukare CreditAttribution: yukare commentedThis is kinda simple to implement, so i will do it for drupal 8. We just need to add a new global setting: tab width and use this
$geshi->set_tab_width($width);
on geshiprocess.Comment #3
yukare CreditAttribution: yukare commentedIt is working, lets see the test.
Comment #5
yukare CreditAttribution: yukare commentedFixed with the commit.