Skip to content

Commit

Permalink
Merge branch 'release/5.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fletcher committed Mar 17, 2016
2 parents f2a0b9c + 9e355e9 commit 101bbad
Show file tree
Hide file tree
Showing 14 changed files with 138 additions and 111 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# MultiMarkdown Change Log #


## [5.2.0] - 2016-03-16 ##

* ADDED: Add additional test cases
* ADDED: Add support for 'HTML FOOTER' metadata -- appended at very end of HTML documents (after footnotes)
* CHANGED: Allow nested strong/emph spans (though effect of output is not defined for all formats)
* CHANGED: Update Math test suite
* CHANGED: Update documentation for 5.1.0
* CHANGED: Update documentation for HTML Footer metadata
* CHANGED: Update test suite
* CHANGED: recursive support for CriticMarkup syntax (e.g. an addition can be included inside a substitution).
* FIXED: Fix bug in handling of '41971' delimited math
* FIXED: Improve accuracy of strong/emph parsing;
* FIXED: Remove debugging statement in recent CriticMarkup changes


## [5.1.0] - 2016-02-22 ##

* ADDED: Add script to build drag and drop apps on OS X
Expand Down Expand Up @@ -80,3 +95,4 @@
[5.0.0]: https://github.com/fletcher/MultiMarkdown-5/releases/tag/5.0
[5.0.1]: https://github.com/fletcher/MultiMarkdown-5/releases/tag/5.0.1
[5.1.0]: https://github.com/fletcher/MultiMarkdown-5/releases/tag/5.1.0
[5.2.0]: https://github.com/fletcher/MultiMarkdown-5/releases/tag/5.2.0
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ cmake_minimum_required (VERSION 2.6)
set (My_Project_Title "MultiMarkdown")
set (My_Project_Description "MultiMarkdown - lightweight markup processor")
set (My_Project_Author "Fletcher T. Penney")
set (My_Project_Revised_Date "2016-02-22")
set (My_Project_Revised_Date "2016-03-16")
set (My_Project_Version_Major 5)
set (My_Project_Version_Minor 1)
set (My_Project_Version_Minor 2)
set (My_Project_Version_Patch 0)

set (My_Project_Version "${My_Project_Version_Major}.${My_Project_Version_Minor}.${My_Project_Version_Patch}")
Expand Down
20 changes: 13 additions & 7 deletions src/critic.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ void print_critic_accept_node(GString *out, node *n, scratch_pad *scratch) {
switch (n->key) {
case LIST:
case CRITICSUBSTITUTION:
case CRITICADDITION:
case CRITICHIGHLIGHT:
print_critic_accept_node_tree(out, n->children, scratch);
break;
case CRITICDELETION:
case CRITICCOMMENT:
break;
case CRITICHIGHLIGHT:
case CRITICADDITION:
default:
g_string_append_printf(out,"%s",n->str);
break;
Expand All @@ -67,13 +67,13 @@ void print_critic_reject_node(GString *out, node *n, scratch_pad *scratch) {
switch (n->key) {
case LIST:
case CRITICSUBSTITUTION:
case CRITICDELETION:
case CRITICHIGHLIGHT:
print_critic_reject_node_tree(out, n->children, scratch);
break;
case CRITICADDITION:
case CRITICCOMMENT:
break;
case CRITICHIGHLIGHT:
case CRITICDELETION:
default:
g_string_append_printf(out,"%s",n->str);
break;
Expand All @@ -92,17 +92,23 @@ void print_critic_html_highlight_node(GString *out, node *n, scratch_pad *scratc
print_critic_html_highlight_node_tree(out, n->children, scratch);
break;
case CRITICADDITION:
g_string_append_printf(out,"<ins>%s</ins>",n->str);
g_string_append_printf(out, "<ins>");
print_critic_html_highlight_node_tree(out, n->children, scratch);
g_string_append_printf(out, "</ins>");
break;
case CRITICCOMMENT:
/* Hide comments for now */
/* g_string_append_printf(out, "<span class=\"critic comment\">%s</span>", n->str); */
break;
case CRITICHIGHLIGHT:
g_string_append_printf(out,"<mark>%s</mark>",n->str);
g_string_append_printf(out, "<mark>");
print_critic_html_highlight_node_tree(out, n->children, scratch);
g_string_append_printf(out, "</mark>");
break;
case CRITICDELETION:
g_string_append_printf(out,"<del>%s</del>",n->str);
g_string_append_printf(out, "<del>");
print_critic_html_highlight_node_tree(out, n->children, scratch);
g_string_append_printf(out, "</del>");
break;
default:
g_string_append_printf(out,"%s",n->str);
Expand Down
5 changes: 5 additions & 0 deletions src/html.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ void print_html_node(GString *out, node *n, scratch_pad *scratch) {
} else if (strcmp(n->str, "htmlheaderlevel") == 0) {
scratch->baseheaderlevel = atoi(n->children->str);
break;
} else if (strcmp(n->str, "htmlfooter") == 0) {
trim_trailing_whitespace(n->children->str);
scratch->html_footer = strdup(n->children->str);
break;
} else if (strcmp(n->str, "quoteslanguage") == 0) {
temp = label_from_node_tree(n->children);
if ((strcmp(temp, "nl") == 0) || (strcmp(temp, "dutch") == 0)) { scratch->language = DUTCH; } else
Expand Down Expand Up @@ -258,6 +262,7 @@ void print_html_node(GString *out, node *n, scratch_pad *scratch) {
} else if (strcmp(n->str, "mmdheader") == 0) {
} else if (strcmp(n->str, "lang") == 0) {
} else if (strcmp(n->str, "transcludebase") == 0) {
} else if (strcmp(n->str, "htmlfooter") == 0) {
} else if (strcmp(n->str, "latexmode") == 0) {
} else if (strcmp(n->str, "latexinput") == 0) {
} else if (strcmp(n->str, "latexfooter") == 0) {
Expand Down
3 changes: 2 additions & 1 deletion src/latex.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ void print_latex_node(GString *out, node *n, scratch_pad *scratch) {
} else if (strcmp(n->str, "css") == 0) {
} else if (strcmp(n->str, "xhtmlheader") == 0) {
} else if (strcmp(n->str, "htmlheader") == 0) {
} else if (strcmp(n->str, "htmlfooter") == 0) {
} else if (strcmp(n->str, "mmdfooter") == 0) {
} else if (strcmp(n->str, "mmdheader") == 0) {
} else if (strcmp(n->str, "lang") == 0) {
Expand Down Expand Up @@ -374,7 +375,7 @@ void print_latex_node(GString *out, node *n, scratch_pad *scratch) {
if (temp[1] == '$') {
if (strncmp(&temp[2],"\\begin",5) == 0) {
temp[strlen(temp)-2] = '\0';
g_string_append_printf(out, "%s",&temp[1]);
g_string_append_printf(out, "%s",&temp[2]);
} else {
g_string_append_printf(out, "%s",temp);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lyx.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ void print_lyx_node(GString *out, node *n, scratch_pad *scratch, bool no_newline
if (n->str[1] == '$') {
if (strncmp(&n->str[2],"\\begin",5) == 0) {
n->str[strlen(n->str)-2] = '\0';
g_string_append_printf(out, "\n\\begin_inset Formula %s\n\\end_inset\n",&n->str[1]);
g_string_append_printf(out, "\n\\begin_inset Formula %s\n\\end_inset\n",&n->str[2]);
} else {
g_string_append_printf(out, "\n\\begin_inset Formula %s\n\\end_inset\n",n->str);
}
Expand Down
5 changes: 3 additions & 2 deletions src/odf.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,9 @@ void print_odf_node(GString *out, node *n, scratch_pad *scratch) {
} else if (strcmp(temp, "css") == 0) {
} else if (strcmp(temp, "xhtmlheader") == 0) {
} else if (strcmp(temp, "htmlheader") == 0) {
} else if (strcmp(n->str, "mmdfooter") == 0) {
} else if (strcmp(n->str, "mmdheader") == 0) {
} else if (strcmp(temp, "htmlfooter") == 0) {
} else if (strcmp(temp, "mmdfooter") == 0) {
} else if (strcmp(temp, "mmdheader") == 0) {
} else if (strcmp(temp, "baseheaderlevel") == 0) {
scratch->baseheaderlevel = atoi(n->children->str);
} else if (strcmp(temp, "odfheaderlevel") == 0) {
Expand Down
4 changes: 4 additions & 0 deletions src/parse_utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ scratch_pad * mk_scratch_pad(unsigned long extensions) {
result->footnote_para_counter = 0;
result->max_footnote_num = 0;
result->obfuscate = 0;
result->html_footer = NULL;
result->no_latex_footnote = 0;
result->latex_footer = NULL;
result->odf_list_needs_end_p = FALSE;
Expand Down Expand Up @@ -305,6 +306,9 @@ void free_scratch_pad(scratch_pad *scratch) {
free_node_tree(scratch->abbreviations);

g_string_free(scratch->lyx_debug_pad, true); /* CRC - initally, no indent */

if (scratch->html_footer != NULL)
free(scratch->html_footer);

if (scratch->latex_footer != NULL)
free(scratch->latex_footer);
Expand Down
1 change: 1 addition & 0 deletions src/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ typedef struct {
int footnote_to_print; /* set while we are printing so we can reverse link */
int footnote_para_counter; /* so we know which para is last */
int max_footnote_num; /* so we know if current note is new or repeat */
char *html_footer; /* store for appending at the end */
bool obfuscate; /* flag that we need to mask email addresses */
char *latex_footer; /* store for appending at the end */
bool no_latex_footnote; /* can't use footnotes in some places */
Expand Down
Loading

0 comments on commit 101bbad

Please sign in to comment.