Changeset 52bce2c89d6bd18c5c3ce1e3cc1ad93512749dfd
- Timestamp:
- 04/30/07 23:11:24
(2 years ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1177967484 +0200
- git-parent:
[c0bc36490c47967a578fdea01c5544d3bed10a91]
- git-author:
- Christopher Jung <bktheg@web.de> 1177967484 +0200
- Message:
Verarbeitung unvollstaendiger Tags am Ende des Textes gefixt
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r79c7e32 |
r52bce2c |
|
| 180 | 180 | |
|---|
| 181 | 181 | // Schliessenden Tag bestimmen |
|---|
| | 182 | // Dazu gleiche Tags (oeffnende und schliessende) zaehlen, bis der counter unter 0 faellt |
|---|
| 182 | 183 | int closetag = -1; |
|---|
| 183 | 184 | int counter = 0; |
|---|
| … | … | |
| 194 | 195 | } |
|---|
| 195 | 196 | else if( (text.charAt(tagIndex-1) == '/') && (text.charAt(tagIndex-2) == '[') ) { |
|---|
| | 197 | // Check, ob ueberhaupt noch genug Platz fuer den Endtag ist |
|---|
| | 198 | if( text.length() - tagIndex <= tag.length() ) { |
|---|
| | 199 | break; |
|---|
| | 200 | } |
|---|
| | 201 | |
|---|
| | 202 | // Check, ob dies wirklich ein Endtag ist, er also mit einem ] beendet wird |
|---|
| | 203 | if( text.charAt(tagIndex+tag.length()) != ']' ) { |
|---|
| | 204 | continue; |
|---|
| | 205 | } |
|---|
| | 206 | |
|---|
| 196 | 207 | counter--; |
|---|
| 197 | 208 | if( counter < 0 ) { |
|---|
| … | … | |
| 250 | 261 | } |
|---|
| 251 | 262 | |
|---|
| 252 | | buffer.append(text.substring(textIndex)); |
|---|
| | 263 | if( textIndex < text.length()-1 ) { |
|---|
| | 264 | buffer.append(text.substring(textIndex)); |
|---|
| | 265 | } |
|---|
| | 266 | |
|---|
| 253 | 267 | return buffer; |
|---|
| 254 | 268 | } |
|---|