cinera.c: Preserve the case of the markers' text

This commit is contained in:
Matt Mascarenhas 2018-04-07 06:30:28 +01:00
parent 4b9e1a2fa0
commit 8d75865cf3
1 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ typedef struct
version CINERA_APP_VERSION = { version CINERA_APP_VERSION = {
.Major = 0, .Major = 0,
.Minor = 5, .Minor = 5,
.Patch = 43 .Patch = 44
}; };
// TODO(matt): Copy in the DB 3 stuff from cinera_working.c // TODO(matt): Copy in the DB 3 stuff from cinera_working.c
@ -3365,11 +3365,11 @@ HMMLToBuffers(buffers *CollationBuffers, template **BespokeTemplate, char *Filen
hsl_colour Colour; hsl_colour Colour;
StringToColourHash(&Colour, Anno->markers[MarkerIndex].marker); StringToColourHash(&Colour, Anno->markers[MarkerIndex].marker);
CopyStringToBuffer(&Text, CopyStringToBuffer(&Text,
"<span class=\"%s\" style=\"color: hsl(%d, %d%%, %d%%);\" data-hue=\"%d\" data-saturation=\"%d%%\">%s</span>", "<span class=\"%s\" style=\"color: hsl(%d, %d%%, %d%%);\" data-hue=\"%d\" data-saturation=\"%d%%\">%.*s</span>",
Anno->markers[MarkerIndex].type == HMML_MEMBER ? "member" : "project", Anno->markers[MarkerIndex].type == HMML_MEMBER ? "member" : "project",
Colour.Hue, Colour.Saturation, Colour.Lightness, Colour.Hue, Colour.Saturation, Colour.Lightness,
Colour.Hue, Colour.Saturation, Colour.Hue, Colour.Saturation,
Readable); StringLength(Readable), InPtr);
} break; } break;
case HMML_CATEGORY: case HMML_CATEGORY:
@ -3389,7 +3389,7 @@ HMMLToBuffers(buffers *CollationBuffers, template **BespokeTemplate, char *Filen
HasFilterMenu = TRUE; HasFilterMenu = TRUE;
} }
InsertCategory(&Topics, &LocalTopics, &Media, &LocalMedia, Anno->markers[MarkerIndex].marker); InsertCategory(&Topics, &LocalTopics, &Media, &LocalMedia, Anno->markers[MarkerIndex].marker);
CopyStringToBuffer(&Text, Readable); CopyStringToBuffer(&Text, "%.*s", StringLength(Readable), InPtr);
} break; } break;
case HMML_MARKER_COUNT: break; case HMML_MARKER_COUNT: break;
} }