From: Fletcher T. Penney Date: Mon, 8 Oct 2018 19:09:01 +0000 (-0400) Subject: UPDATED: table id attribute should be on table not caption X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b269b026b7b6f1699924828c739a2b10e491eb4;p=multimarkdown UPDATED: table id attribute should be on table not caption --- diff --git a/Sources/libMultiMarkdown/html.c b/Sources/libMultiMarkdown/html.c index 818aec5..877cd4a 100644 --- a/Sources/libMultiMarkdown/html.c +++ b/Sources/libMultiMarkdown/html.c @@ -892,7 +892,7 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc case BLOCK_TABLE: pad(out, 2, scratch); - print_const("\n"); + print_const("", temp_char); + printf(" id=\"%s\">\n\n"); temp_short = 1; } else { + print_const(">\n"); temp_short = 0; } diff --git a/tests/MMD6Tests/Abbreviations.html b/tests/MMD6Tests/Abbreviations.html index e2431d2..a930225 100644 --- a/tests/MMD6Tests/Abbreviations.html +++ b/tests/MMD6Tests/Abbreviations.html @@ -45,8 +45,8 @@

15

-
", temp_char); free(temp_char); t->next->child->child->type = TEXT_EMPTY; @@ -913,6 +913,7 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc print_const("
- +
foo bar
+diff --git a/tests/MMD6Tests/Tables.html b/tests/MMD6Tests/Tables.html index db909d1..825ccb1 100644 --- a/tests/MMD6Tests/Tables.html +++ b/tests/MMD6Tests/Tables.html @@ -140,8 +140,8 @@
foo bar
- - +
caption
+@@ -162,8 +162,8 @@
caption
- - +
caption
+@@ -191,8 +191,8 @@

6

-
caption
- +
caption
+@@ -209,8 +209,8 @@
caption
- - +
no trailing newline
+
no trailing newline