summaryrefslogtreecommitdiff
path: root/src/gmdocument.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r--src/gmdocument.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index c298f75b..ec0bddb5 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -181,7 +181,7 @@ static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li
181 iGmLink *link = new_GmLink(); 181 iGmLink *link = new_GmLink();
182 link->urlRange = capturedRange_RegExpMatch(&m, 1); 182 link->urlRange = capturedRange_RegExpMatch(&m, 1);
183 setRange_String(&link->url, link->urlRange); 183 setRange_String(&link->url, link->urlRange);
184 set_String(&link->url, canonicalUrl_String(absoluteUrl_String(&d->url, &link->url))); 184 set_String(&link->url, canonicalUrl_String(absoluteUrl_String(&d->url, &link->url)));
185 /* Check the URL. */ { 185 /* Check the URL. */ {
186 iUrl parts; 186 iUrl parts;
187 init_Url(&parts, &link->url); 187 init_Url(&parts, &link->url);
@@ -409,6 +409,9 @@ static void doLayout_GmDocument_(iGmDocument *d) {
409 indents[bullet_GmLineType] -= 5; 409 indents[bullet_GmLineType] -= 5;
410 indents[preformatted_GmLineType] -= 5; 410 indents[preformatted_GmLineType] -= 5;
411 } 411 }
412 if (isGopher) {
413 indents[preformatted_GmLineType] = indents[text_GmLineType];
414 }
412 static const float topMargin[max_GmLineType] = { 415 static const float topMargin[max_GmLineType] = {
413 0.0f, 0.333f, 1.0f, 0.5f, 2.0f, 1.5f, 1.25f, 0.25f 416 0.0f, 0.333f, 1.0f, 0.5f, 2.0f, 1.5f, 1.25f, 0.25f
414 }; 417 };
@@ -569,6 +572,10 @@ static void doLayout_GmDocument_(iGmDocument *d) {
569 if (type != preformatted_GmLineType || prevType != preformatted_GmLineType) { 572 if (type != preformatted_GmLineType || prevType != preformatted_GmLineType) {
570 enableIndents = iTrue; 573 enableIndents = iTrue;
571 } 574 }
575 /* Gopher: Always indent preformatted blocks. */
576 if (isGopher && type == preformatted_GmLineType) {
577 enableIndents = iTrue;
578 }
572 if (!enableIndents) { 579 if (!enableIndents) {
573 indent = 0; 580 indent = 0;
574 } 581 }