Skip to content
Browse files

fix for URLState

  • Loading branch information...
1 parent f4caa64 commit 674231db5dbf20b907c79826e9f7f2447d3e5344 Todd Ditchendorf committed
Showing with 7 additions and 2 deletions.
  1. +6 −1 src/PKURLState.m
  2. +1 −1 test/TDTestScaffold.m
View
7 src/PKURLState.m
@@ -80,6 +80,11 @@ - (PKToken *)nextTokenFromReader:(PKReader *)r startingWith:(PKUniChar)cin token
NSString *s = [self bufferedString];
if (matched) {
+ if ([s hasSuffix:@"."]) {
+ s = [s substringToIndex:[s length] - 1];
+ [r unread];
+ }
+
PKToken *tok = [PKToken tokenWithTokenType:PKTokenTypeURL stringValue:s floatValue:0.0];
tok.offset = offset;
return tok;
@@ -184,7 +189,7 @@ - (void)parsePathFromReader:(PKReader *)r {
BOOL hasOpenParen = NO;
for (;;) {
- if (PKEOF == c || isspace(c) || '<' == c || '>' == c || '.' == c) {
+ if (PKEOF == c || isspace(c) || '<' == c || '>' == c) {
break;
} else if (')' == c) {
if (hasOpenParen) {
View
2 test/TDTestScaffold.m
@@ -14,7 +14,7 @@
#import "TDTestScaffold.h"
-#define RUN_ALL_TEST_CASES 1
+#define RUN_ALL_TEST_CASES 0
#define SOLO_TEST_CASE @"TDURLStateTest"
@interface SenTestSuite (TDAdditions)

0 comments on commit 674231d

Please sign in to comment.
Something went wrong with that request. Please try again.