Closes a bracket and unindents leading whitespace.
()
| 880 | * Closes a bracket and unindents leading whitespace. |
| 881 | */ |
| 882 | private void close() { |
| 883 | int p = pos - 1; |
| 884 | for(; p >= 0; p--) { |
| 885 | final byte b = text[p]; |
| 886 | if(b == '\n') break; |
| 887 | if(!ws(b)) return; |
| 888 | } |
| 889 | if(++p >= pos) return; |
| 890 | start = Math.max(pos - indent(), p); |
| 891 | end = Math.max(pos, p); |
| 892 | if(start != end) delete(); |
| 893 | } |
| 894 | |
| 895 | /** |
| 896 | * Tries to close an opening tag. |