livebs / syntaxhighlighter

Automatically exported from code.google.com/p/syntaxhighlighter
GNU General Public License v3.0
0 stars 0 forks source link

Tab size is assumed to be 4 spaces. #106

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Display any code with tabs used for indentation.  I used Java code that
was written with Emacs, which automatically uses 8-space tabs (the normal
width of a tab in most plain-text editors).

What is the expected output? What do you see instead?

Because tabs are only displayed as 4 spaces, the indentation does not
appear correctly.

What version of the product are you using? On what operating system?

1.5.1 on Firefox 3 on Windows XP

Please provide any additional information below.

This can be fixed by changing the tabSize variable in shCore.java to a
value of 8.  If this could be a configuration item, that would be very good.

Original issue reported on code.google.com by drcoops...@gmail.com on 18 Sep 2008 at 3:18

GoogleCodeExporter commented 8 years ago
My modified shCore.js (not shCore.java as written above, oops!) file can be 
found
here: http://www.iancooper.name/javascripts/syntaxhighlighter/shCore.js

Line 73 contains the tabSize variable; I have changed it to 8 and the code 
displays
properly.  Example code: 
http://www.iancooper.name/pages/javascript/JavaScriptEngine.java

Original comment by drcoops...@gmail.com on 18 Sep 2008 at 3:20

GoogleCodeExporter commented 8 years ago
I'm not sure what you mean. Tabs are automatically converted to form aligned 
columns 
based on 4-space tabs. Have a look at the "smart tabs" example to see what I 
mean.

Original comment by alex.gor...@gmail.com on 9 Oct 2008 at 1:30

GoogleCodeExporter commented 8 years ago
If you use a text editor that assumes tabs work off of 8-space columns, the
syntaxhighlighter code's assumption of 4-space columns messes up the formatting 
of
the code.

Original comment by drcoops...@gmail.com on 9 Oct 2008 at 2:57

GoogleCodeExporter commented 8 years ago
I see you point. I'll have a look at making this configurable.

Original comment by alex.gor...@gmail.com on 9 Oct 2008 at 5:18

GoogleCodeExporter commented 8 years ago

Original comment by alex.gor...@gmail.com on 9 Oct 2008 at 5:18