From 401e937ad83d0989bf144f2777c72299f95292d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= jaakko.keranen@iki.fi
Date: Mon, 8 Mar 2021 12:22:50 +0200
Subject: [PATCH 1/1] Gemtext markup was visible with Monospace Body
src/gmdocument.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gmdocument.c b/src/gmdocument.c
index f5ce90a1..a26f9212 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -122,10 +122,12 @@ static enum iGmLineType lineType_GmDocument_(const iGmDocument *d, const iRangec
return text_GmLineType;
}
-static void trimLine_Rangecc_(iRangecc *line, enum iGmLineType type) {
+static void trimLine_Rangecc_(iRangecc *line, enum iGmLineType type, iBool normalize) {
static const unsigned int skip[max_GmLineType] = { 0, 2, 3, 1, 1, 2, 3, 0 };
line->start += skip[type];
trim_Rangecc(line);
}
static int lastVisibleRunBottom_GmDocument_(const iGmDocument *d) {
@@ -363,7 +365,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
d->size.x - indents[preformatted_GmLineType]) {
preFont = preformattedSmall_FontId;
}
trimLine_Rangecc_(&line, type);
trimLine_Rangecc_(&line, type, isNormalized);
preAltText = line;
/* TODO: store and link the alt text to this run */
continue;
@@ -375,9 +377,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
type = text_GmLineType;
}
}
if (isNormalized) {
trimLine_Rangecc_(&line, type);
}
trimLine_Rangecc_(&line, type, isNormalized);
run.font = fonts[type];
/* Remember headings for the document outline. */
if (type == heading1_GmLineType || type == heading2_GmLineType || type == heading3_GmLineType) {
--
2.25.1
text/plain
This content has been proxied by September (3851b).