| 881 | } |
| 882 | |
| 883 | func (w *formatSpanWorker) characterToColumn(startLinePosition int, characterInLine int) int { |
| 884 | column := 0 |
| 885 | for i := range characterInLine { |
| 886 | if w.sourceFile.Text()[startLinePosition+i] == '\t' { |
| 887 | if w.formattingContext.Options.TabSize > 0 { |
| 888 | column += w.formattingContext.Options.TabSize - (column % w.formattingContext.Options.TabSize) |
| 889 | } |
| 890 | } else { |
| 891 | column++ |
| 892 | } |
| 893 | } |
| 894 | return column |
| 895 | } |
| 896 | |
| 897 | func (w *formatSpanWorker) indentationIsDifferent(indentationString string, startLinePosition int) bool { |
| 898 | text := w.sourceFile.Text() |