]> granicus.if.org Git - multimarkdown/commitdiff
UPDATED: Tidy code
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 11 Mar 2019 04:10:36 +0000 (00:10 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 11 Mar 2019 04:10:36 +0000 (00:10 -0400)
Sources/libMultiMarkdown/html.c

index 1bc97e1843af7175a12a0ff7c2f31a88bd05e274..1c6606b727cbf82240b35a35a21dd6feb5e452d4 100644 (file)
@@ -533,6 +533,8 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
        token * temp_token      = NULL;
        footnote * temp_note = NULL;
 
+       t->out_start = out->currentStringLength;
+
        switch (t->type) {
                case AMPERSAND:
                case AMPERSAND_LONG:
@@ -2044,6 +2046,8 @@ parse_citation:
                        token_describe(t, source);
                        break;
        }
+
+       t->out_len = out->currentStringLength - t->out_start;
 }
 
 
@@ -2227,6 +2231,8 @@ void mmd_export_token_html_raw(DString * out, const char * source, token * t, sc
 
                        break;
        }
+
+       t->out_len = out->currentStringLength - t->out_start;
 }