Skip to content

Commit 3f5e669

Browse files
committed
Fixed another out of spec pdf issue.
1 parent 1bb0cff commit 3f5e669

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/PdfSharp/Pdf.IO/Lexer.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,18 @@ public Symbol ScanName()
410410
{
411411
return _symbol = Symbol.Name;
412412
}
413-
break;
413+
414+
string tkn = Token;
415+
416+
int position = Position;
417+
ScanNextChar(true);
418+
MoveToNonWhiteSpace();
419+
bool isRef = PeekReference();
420+
Position = position;
421+
_token = new StringBuilder(tkn);
422+
if (isRef)
423+
return _symbol = Symbol.Name;
424+
break;
414425
case '{':
415426
//TODO: Handle invalid delimiters
416427
return _symbol = Symbol.Name;

0 commit comments

Comments
 (0)