indentGCD returns the greatest common divisor of a and b. Used only by detectIndentUnit on positive space-lead lengths.
(a, b int)
| 819 | // indentGCD returns the greatest common divisor of a and b. Used |
| 820 | // only by detectIndentUnit on positive space-lead lengths. |
| 821 | func indentGCD(a, b int) int { |
| 822 | for b != 0 { |
| 823 | a, b = b, a%b |
| 824 | } |
| 825 | return a |
| 826 | } |
| 827 | |
| 828 | // translateIndentLevel returns the file-side lead for an inserted |
| 829 | // splice line by translating the caller's indent level. rLead is |
no outgoing calls