We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf60436 commit 1f5dd99Copy full SHA for 1f5dd99
xmlparser.go
@@ -414,27 +414,26 @@ scan_declartions:
414
415
if a[0] == '<' {
416
417
- // read peaked byte first
418
- _, err = x.readByte()
419
- if err != nil {
420
- return err
421
- }
422
-
423
- b, err = x.reader.Peek(1)
+ b, err = x.reader.Peek(2)
424
425
if err != nil {
426
return err
427
}
428
429
- if b[0] == '!' || b[0] == '?' { // either comment or decleration
+ if b[1] == '!' || b[1] == '?' { // either comment or decleration
430
431
- // read peaked byte
+ // read 2 peaked byte
432
_, err = x.readByte()
433
434
435
436
437
+ _, err = x.readByte()
+ if err != nil {
+ return err
+ }
+
438
c, err = x.readByte()
439
440
0 commit comments