diff -r e26e18b7099e html.editor/src/org/netbeans/modules/html/editor/HTMLBracesMatching.java
--- a/html.editor/src/org/netbeans/modules/html/editor/HTMLBracesMatching.java Mon Oct 06 16:06:08 2008 +0200
+++ b/html.editor/src/org/netbeans/modules/html/editor/HTMLBracesMatching.java Mon Oct 06 16:09:48 2008 +0200
@@ -127,9 +127,13 @@
} else {
int from = t2.offset(th);
int to = t3.offset(th) + t3.length();
- return new int[]{from, to,
- from, tagNameEnd,
- to - 1, to};
+ if (tagNameEnd != -1) {
+ return new int[]{from, to,
+ from, tagNameEnd,
+ to - 1, to};
+ } else {
+ return new int [] {from, to};
+ }
}
} else if(t3.id() == HTMLTokenId.TAG_OPEN || t3.id() == HTMLTokenId.TAG_CLOSE) {
tagNameEnd = t3.offset(th) + t3.length();