(line, pos, count)
| 879 | // This function inserts specified amount of spaces in the string |
| 880 | // where a tab is while removing that given tab. |
| 881 | function insertSpaces(line, pos, count) |
| 882 | { |
| 883 | return line.substr(0, pos) |
| 884 | + spaces.substr(0, count) |
| 885 | + line.substr(pos + 1, line.length) // pos + 1 will get rid of the tab |
| 886 | ; |
| 887 | }; |
| 888 | |
| 889 | // Go through all the lines and do the 'smart tabs' magic. |
| 890 | code = eachLine(code, function(line) |