summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-06-13 15:27:34 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-06-15 14:06:33 +0300
commit0e46354f810c84827199faa3780691d772b7bd5b (patch)
treea912eae811d093e3661c6f2be2e403092eb60eb3
parentf959fccf855af48cebf1cfae75c6938bba635e51 (diff)
GmDocument: Link icons
# Conflicts: # src/gmdocument.c
-rw-r--r--src/gmdocument.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index b95f85e7..4f9f97e7 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -254,9 +254,12 @@ static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li
254 if ((len = decodeBytes_MultibyteChar(desc.start, desc.end, &icon)) > 0) { 254 if ((len = decodeBytes_MultibyteChar(desc.start, desc.end, &icon)) > 0) {
255 if (desc.start + len < desc.end && 255 if (desc.start + len < desc.end &&
256 (isPictograph_Char(icon) || isEmoji_Char(icon) || 256 (isPictograph_Char(icon) || isEmoji_Char(icon) ||
257 /* TODO: Add range(s) of 0x2nnn symbols. */
258 icon == 0x2139 /* info */ ||
257 icon == 0x2191 /* up arrow */ || 259 icon == 0x2191 /* up arrow */ ||
260 icon == 0x2022 /* bullet */ ||
258 icon == 0x2a2f /* close X */ || 261 icon == 0x2a2f /* close X */ ||
259 icon == 0x2022 /* bullet */) && 262 icon == 0x2b50) &&
260 !isFitzpatrickType_Char(icon)) { 263 !isFitzpatrickType_Char(icon)) {
261 link->flags |= iconFromLabel_GmLinkFlag; 264 link->flags |= iconFromLabel_GmLinkFlag;
262 link->labelIcon = (iRangecc){ desc.start, desc.start + len }; 265 link->labelIcon = (iRangecc){ desc.start, desc.start + len };