Skip to content

Commit

Permalink
Merge branch 'release/6.5.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
fletcher committed Oct 28, 2020
2 parents bc52210 + 727ed1b commit 3406b73
Show file tree
Hide file tree
Showing 46 changed files with 30,834 additions and 62,366 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ cmake_minimum_required (VERSION 2.6)
set (My_Project_Title "MultiMarkdown")
set (My_Project_Description "Lightweight markup processor to produce HTML, LaTeX, and more.")
set (My_Project_Author "Fletcher T. Penney")
set (My_Project_Revised_Date "2020-04-10")
set (My_Project_Revised_Date "2020-10-28")
set (My_Project_Version_Major 6)
set (My_Project_Version_Minor 5)
set (My_Project_Version_Patch 2)
set (My_Project_Version_Patch 3)

set (My_Project_Version "${My_Project_Version_Major}.${My_Project_Version_Minor}.${My_Project_Version_Patch}")

Expand Down Expand Up @@ -524,6 +524,7 @@ SET_TARGET_PROPERTIES(libMultiMarkdown PROPERTIES
FRAMEWORK_VERSION A
MACOSX_FRAMEWORK_IDENTIFIER net.multimarkdown.mmd6
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "net.multimarkdown.mmd6"
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)

ADD_PUBLIC_HEADER(libMultiMarkdown Sources/libMultiMarkdown/include/libMultiMarkdown.h)
Expand Down
Binary file modified DevelopmentNotes/DevelopmentNotes.epub
Binary file not shown.
63 changes: 62 additions & 1 deletion DevelopmentNotes/DevelopmentNotes.fodt
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ office:mimetype="application/vnd.oasis.opendocument.text">
<office:meta>
<dc:title>MultiMarkdown v6 Development Notes</dc:title>
<dc:creator>Fletcher T. Penney</dc:creator>
<meta:user-defined meta:name="date">2020-04-10</meta:user-defined>
<meta:user-defined meta:name="date">2020-10-28</meta:user-defined>
<meta:user-defined meta:name="uuid">dd2d8e76-dc2d-416d-9acd-5395d20871c2</meta:user-defined>
</office:meta>
<office:body>
Expand Down Expand Up @@ -763,6 +763,67 @@ TextBundle/TextPack, OpenDocument, etc.</text:p></text:list-item>
<text:h text:outline-level="3"><text:bookmark text:name="changelog"/>Changelog</text:h>

<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="Standard">2020&#8211;10&#8211;28 - v 6.5.3:</text:p>

<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="P1">
ADDED: Add additional blockquote tests</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
ADDED: Add format to create HTML with storing of assets</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Add latex footer to beamer output format (fixes #185)</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Allow hyphen in image/link unquoted attributes</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Don&#8217;t free NULL link</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Fix CMake issue</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Fix issue when parsing blockquote that contains raw HTML</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Fix issue with tight list where last item has multiple paragraphs not being recognized as a loose list</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Fix regression</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Fix test suite</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Improve blockquote parser</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Prevent iOS Safari from bastardizing left arrow unicode character with an ugly emoji</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: tweak CriticMarkup highlight handling</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="Standard">Merge branch &#8216;develop&#8217; of github.com:fletcher/MultiMarkdown-6 into develop</text:p></text:list-item>

</text:list></text:list-item>

<text:list-item>
<text:p text:style-name="Standard">2020&#8211;04&#8211;10 - v 6.5.2:</text:p>

Expand Down
22 changes: 20 additions & 2 deletions DevelopmentNotes/DevelopmentNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<title>MultiMarkdown v6 Development Notes</title>
<meta name="author" content="Fletcher T. Penney"/>
<meta name="date" content="2020-04-10"/>
<meta name="date" content="2020-10-28"/>
<meta name="uuid" content="dd2d8e76-dc2d-416d-9acd-5395d20871c2"/>
</head>
<body>
Expand Down Expand Up @@ -433,6 +433,24 @@ <h3 id="dependencieslibraries">Dependencies/Libraries</h3>
<h3 id="changelog">Changelog</h3>

<ul>
<li><p>2020&#8211;10&#8211;28 - v 6.5.3:</p>

<ul>
<li>ADDED: Add additional blockquote tests</li>
<li>ADDED: Add format to create HTML with storing of assets</li>
<li>FIXED: Add latex footer to beamer output format (fixes #185)</li>
<li>FIXED: Allow hyphen in image/link unquoted attributes</li>
<li>FIXED: Don&#8217;t free NULL link</li>
<li>FIXED: Fix CMake issue</li>
<li>FIXED: Fix issue when parsing blockquote that contains raw HTML</li>
<li>FIXED: Fix issue with tight list where last item has multiple paragraphs not being recognized as a loose list</li>
<li>FIXED: Fix regression</li>
<li>FIXED: Fix test suite</li>
<li>FIXED: Improve blockquote parser</li>
<li>FIXED: Prevent iOS Safari from bastardizing left arrow unicode character with an ugly emoji</li>
<li>FIXED: tweak CriticMarkup highlight handling</li>
<li>Merge branch &#8216;develop&#8217; of github.com:fletcher/MultiMarkdown-6 into develop</li>
</ul></li>
<li><p>2020&#8211;04&#8211;10 - v 6.5.2:</p>

<ul>
Expand Down Expand Up @@ -1120,7 +1138,7 @@ <h3 id="changelog">Changelog</h3>
<ol>

<li id="gn:1">
PEG: <p>Parsing Expression Grammar <a href="https://en.wikipedia.org/wiki/Parsing_expression_grammar">https://en.wikipedia.org/wiki/Parsing_expression_grammar</a> <a href="#gnref:1" title="return to body" class="reverseglossary">&#160;&#8617;</a></p>
PEG: <p>Parsing Expression Grammar <a href="https://en.wikipedia.org/wiki/Parsing_expression_grammar">https://en.wikipedia.org/wiki/Parsing_expression_grammar</a> <a href="#gnref:1" title="return to body" class="reverseglossary">&#160;&#8617;&#xfe0e;</a></p>
</li>

</ol>
Expand Down
Binary file modified DevelopmentNotes/DevelopmentNotes.pdf
Binary file not shown.
20 changes: 19 additions & 1 deletion DevelopmentNotes/DevelopmentNotes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Title: MultiMarkdown v6 Development Notes
Author: Fletcher T. Penney
Date: 2020-04-10
Date: 2020-10-28
LaTeX Config: tufte-handout
Base Header Level: 3
uuid: dd2d8e76-dc2d-416d-9acd-5395d20871c2
Expand Down Expand Up @@ -472,6 +472,24 @@ TextBundle/TextPack, OpenDocument, etc.

# Changelog #

* 2020-10-28 - v 6.5.3:

* ADDED: Add additional blockquote tests
* ADDED: Add format to create HTML with storing of assets
* FIXED: Add latex footer to beamer output format (fixes #185)
* FIXED: Allow hyphen in image/link unquoted attributes
* FIXED: Don't free NULL link
* FIXED: Fix CMake issue
* FIXED: Fix issue when parsing blockquote that contains raw HTML
* FIXED: Fix issue with tight list where last item has multiple paragraphs not being recognized as a loose list
* FIXED: Fix regression
* FIXED: Fix test suite
* FIXED: Improve blockquote parser
* FIXED: Prevent iOS Safari from bastardizing left arrow unicode character with an ugly emoji
* FIXED: tweak CriticMarkup highlight handling
* Merge branch 'develop' of github.com:fletcher/MultiMarkdown-6 into develop


* 2020-04-10 - v 6.5.2:

* FIXED: Don't use undefined version string
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
| ---------- | ------------------------- |
| Title: | MultiMarkdown |
| Author: | Fletcher T. Penney |
| Date: | 2020-04-10 |
| Date: | 2020-10-28 |
| Copyright: | Copyright © 2016 - 2020 Fletcher T. Penney. |
| Version: | 6.5.2 |
| Version: | 6.5.3 |

master branch: [![Build Status](https://travis-ci.org/fletcher/MultiMarkdown-6.svg?branch=master)](https://travis-ci.org/fletcher/MultiMarkdown-6)
develop branch: [![Build Status](https://travis-ci.org/fletcher/MultiMarkdown-6.svg?branch=develop)](https://travis-ci.org/fletcher/MultiMarkdown-6)
Expand Down
6 changes: 6 additions & 0 deletions Sources/libMultiMarkdown/beamer.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ void mmd_end_complete_beamer(DString * out, const char * source, scratch_pad * s

if (m) {
printf("\\input{%s}\n\n", m->value);
} else {
m = extract_meta_from_stack(scratch, "latexconfig");

if (m) {
printf("\\input{mmd6-%s-footer}\n", m->value);
}
}

print_const("\\end{document}");
Expand Down
7 changes: 4 additions & 3 deletions Sources/libMultiMarkdown/html.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
scratch->footnote_para_counter--;

if (scratch->footnote_para_counter == 0) {
printf(" <a href=\"#cnref:%d\" title=\"%s\" class=\"reversecitation\">&#160;&#8617;</a>", scratch->citation_being_printed, LC("return to body"));
printf(" <a href=\"#cnref:%d\" title=\"%s\" class=\"reversecitation\">&#160;&#8617;&#xfe0e;</a>", scratch->citation_being_printed, LC("return to body"));
}
}

Expand All @@ -838,15 +838,15 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
temp_short = rand() % 32000 + 1;
}

printf(" <a href=\"#fnref:%d\" title=\"%s\" class=\"reversefootnote\">&#160;&#8617;</a>", temp_short, LC("return to body"));
printf(" <a href=\"#fnref:%d\" title=\"%s\" class=\"reversefootnote\">&#160;&#8617;&#xfe0e;</a>", temp_short, LC("return to body"));
}
}

if (scratch->glossary_being_printed) {
scratch->footnote_para_counter--;

if (scratch->footnote_para_counter == 0) {
printf(" <a href=\"#gnref:%d\" title=\"%s\" class=\"reverseglossary\">&#160;&#8617;</a>", scratch->glossary_being_printed, LC("return to body"));
printf(" <a href=\"#gnref:%d\" title=\"%s\" class=\"reverseglossary\">&#160;&#8617;&#xfe0e;</a>", scratch->glossary_being_printed, LC("return to body"));
}
}

Expand Down Expand Up @@ -1775,6 +1775,7 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
break;

case PAIR_CRITIC_HI:
stack_push(scratch->critic_stack, t);

// Ignore if we're rejecting or accepting
if ((scratch->extensions & EXT_CRITIC_REJECT) ||
Expand Down
1 change: 1 addition & 0 deletions Sources/libMultiMarkdown/include/libMultiMarkdown.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ enum output_format {
FORMAT_OPML,
FORMAT_ITMZ,
FORMAT_MMD,
FORMAT_HTML_WITH_ASSETS
};


Expand Down
5 changes: 0 additions & 5 deletions Sources/libMultiMarkdown/latex.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,6 @@ void mmd_export_image_latex(DString * out, const char * source, token * text, li
char * width = NULL;
float temp_float;

// Compatibility mode doesn't allow figures
if (scratch->extensions & EXT_COMPATIBILITY) {
is_figure = false;
}

if (is_figure) {
print_const("\\begin{figure}[htbp]\n\\centering\n");
scratch->close_para = false;
Expand Down
62 changes: 46 additions & 16 deletions Sources/libMultiMarkdown/mmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,28 +931,47 @@ void deindent_block(mmd_engine * e, token * block) {
}


void prune_first_child_from_line(token * line) {
token * t = line->child;

if (t) {
line->child = t->next;
t->next = NULL;

if (line->child) {
line->child->prev = NULL;
line->child->tail = t->tail;
}

token_free(t);
}
}


/// Strip leading blockquote marker from line
void strip_quote_markers_from_line(token * line, const char * source) {
if (!line || !line->child) {
return;
}

token * t;
token * t = NULL;

switch (line->child->type) {
case MARKER_BLOCKQUOTE:
case NON_INDENT_SPACE:
t = line->child;
line->child = t->next;
t->next = NULL;
while (line->child && t != line->child) {
t = line->child;

if (line->child) {
line->child->prev = NULL;
line->child->tail = t->tail;
}
switch (line->child->type) {
case TEXT_PLAIN:
if ((line->child->len == 1) && (source[line->child->start] == ' ')) {
prune_first_child_from_line(line);
}

token_free(t);
break;
break;

case MARKER_BLOCKQUOTE:
case NON_INDENT_SPACE:
prune_first_child_from_line(line);
break;
}
}

if (line->child && (line->child->type == TEXT_PLAIN)) {
Expand Down Expand Up @@ -1839,6 +1858,10 @@ void is_list_loose(token * list) {

walker = walker->next;
}

if (walker->child && walker->child->next && (walker->child->next->next != NULL)) {
loose = true;
}
}

if (loose) {
Expand Down Expand Up @@ -2150,13 +2173,20 @@ void strip_line_tokens_from_block(mmd_engine * e, token * block) {
case LINE_INDENTED_SPACE:

// Strip leading indent (Only the first one)
if (block->type != BLOCK_CODE_FENCED && l->child && ((l->child->type == INDENT_SPACE) || (l->child->type == INDENT_TAB))) {
if (
(block->type != BLOCK_CODE_FENCED && block->type != BLOCK_HTML) &&
l->child &&
((l->child->type == INDENT_SPACE) || (l->child->type == INDENT_TAB))
) {
token_remove_first_child(l);
}

// If we're not a code block, strip additional indents
if ((block->type != BLOCK_CODE_INDENTED) &&
(block->type != BLOCK_CODE_FENCED)) {
if (
(block->type != BLOCK_CODE_INDENTED) &&
(block->type != BLOCK_CODE_FENCED) &&
(block->type != BLOCK_HTML)
) {
while (l->child && ((l->child->type == INDENT_SPACE) || (l->child->type == INDENT_TAB))) {
token_remove_first_child(l);
}
Expand Down
Loading

0 comments on commit 3406b73

Please sign in to comment.