about summary refs log tree commit diff stats
path: root/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'decode.c')
-rw-r--r--decode.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/decode.c b/decode.c
index 756a7b8..6498fc9 100644
--- a/decode.c
+++ b/decode.c
@@ -64,17 +64,17 @@ _case_link(char **text)
 	memset(ret, 0, sizeof(*ret));
 	ret->type = GEMTEXT_LINK;
 
-	if (*(ptr+2) == ' ')
-		ptr += 3;
-	else
-		ptr += 2;
+	ptr += 2; /* skip "=>" */
+	while (*ptr == ' ' || *ptr == '\t')
+		ptr++;
 	cpy = ptr;
-	while (*ptr != '\r' && *ptr != '\n' && *ptr != ' ' && *ptr != '\0')
+	while (*ptr != '\r' && *ptr != '\n' && *ptr != ' ' && *ptr != '\t' && *ptr != '\0')
 		ptr++;
 	ret->link = strndup(cpy, ptr-cpy);
 
-	if (*ptr == ' ') {
-		ptr++;
+	if (*ptr == ' ' || *ptr == '\t') {
+		while(*ptr == ' ' || *ptr == '\t')
+			ptr++;
 		cpy = ptr;
 		while (*ptr != '\r' && *ptr != '\n' && *ptr != '\0')
 			ptr++;