Now handle links with no text
This commit is contained in:
parent
3fd7bddeeb
commit
9a2f0ddc89
|
@ -115,7 +115,7 @@ parseFile (const char *path)
|
||||||
beginUrl++;
|
beginUrl++;
|
||||||
|
|
||||||
//Get URL lenght
|
//Get URL lenght
|
||||||
while (beginUrl + urlLen < size && line[beginUrl + urlLen] != ' ')
|
while (beginUrl + urlLen < size && line[beginUrl + urlLen] != ' ' && line[beginUrl + urlLen] != '\n')
|
||||||
urlLen++;
|
urlLen++;
|
||||||
|
|
||||||
//mark end of url
|
//mark end of url
|
||||||
|
@ -136,7 +136,7 @@ parseFile (const char *path)
|
||||||
//If not text, text = url
|
//If not text, text = url
|
||||||
if (beginText == size)
|
if (beginText == size)
|
||||||
#ifdef TESTGEMPARSE
|
#ifdef TESTGEMPARSE
|
||||||
addLink (line + beginUrl, links[linkNumber]);
|
addLink (line + beginUrl, line + beginUrl);
|
||||||
#else
|
#else
|
||||||
addLink (render, links[linkNumber], links[linkNumber]);
|
addLink (render, links[linkNumber], links[linkNumber]);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue