summaryrefslogtreecommitdiff
path: root/src/gmdocument.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r--src/gmdocument.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index 2a31fe77..7ee7839e 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -163,6 +163,7 @@ static iInt2 measurePreformattedBlock_GmDocument_(const iGmDocument *d, const ch
163} 163}
164 164
165static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *linkId) { 165static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *linkId) {
166 /* Returns the human-readable label of the link. */
166 static iRegExp *pattern_; 167 static iRegExp *pattern_;
167 if (!pattern_) { 168 if (!pattern_) {
168 pattern_ = new_RegExp("=>\\s*([^\\s]+)(\\s.*)?", caseInsensitive_RegExpOption); 169 pattern_ = new_RegExp("=>\\s*([^\\s]+)(\\s.*)?", caseInsensitive_RegExpOption);
@@ -250,7 +251,7 @@ static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li
250 link->flags |= iconFromLabel_GmLinkFlag; 251 link->flags |= iconFromLabel_GmLinkFlag;
251 link->labelIcon = (iRangecc){ desc.start, desc.start + len }; 252 link->labelIcon = (iRangecc){ desc.start, desc.start + len };
252 line.start += len; 253 line.start += len;
253 line.start = skipSpace_CStr(line.start); 254 trimStart_Rangecc(&line);
254// printf("custom icon: %x (%s)\n", icon, cstr_Rangecc(link->labelIcon)); 255// printf("custom icon: %x (%s)\n", icon, cstr_Rangecc(link->labelIcon));
255// fflush(stdout); 256// fflush(stdout);
256 } 257 }