From 769c79b0af27137e7d8d302cd86baeeb4bfb3230 Mon Sep 17 00:00:00 2001 From: Alex Baines Date: Fri, 24 Mar 2017 23:45:39 +0000 Subject: [PATCH] convert markers to lowercase --- hmmlib/hmmlib.l | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hmmlib/hmmlib.l b/hmmlib/hmmlib.l index faee716..fa59e18 100644 --- a/hmmlib/hmmlib.l +++ b/hmmlib/hmmlib.l @@ -231,6 +231,10 @@ HMML_Output hmml_parse_file(FILE* f){ a->marker_count = sb_count(a->markers); a->reference_count = sb_count(a->references); + for(size_t j = 0; j < sb_count(a->markers); ++j){ + for(char* c = a->markers[j].marker; *c; ++c) *c = tolower(*c); + } + if(a->is_quote && a->quote.author){ sb_push(a->quote.author, 0); } @@ -359,8 +363,6 @@ void hmml_dump(HMML_Output* hmml){ max_text_len = len; } - for(char* c = text; *c; ++c) *c = tolower(*c); - Index* idx; if(!(idx = index_find(markers[type], text))){ Index x = { text };