Skip to content

Commit

Permalink
Merge branch 'release/6.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
fletcher committed Apr 9, 2017
2 parents 2839a76 + 048a0a6 commit f073b8d
Show file tree
Hide file tree
Showing 41 changed files with 1,164 additions and 962 deletions.
4 changes: 2 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 "2017-03-29")
set (My_Project_Revised_Date "2017-04-09")
set (My_Project_Version_Major 6)
set (My_Project_Version_Minor 0)
set (My_Project_Version_Patch 3)
set (My_Project_Version_Patch 4)

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

Expand Down
Binary file modified DevelopmentNotes/DevelopmentNotes.epub
Binary file not shown.
55 changes: 55 additions & 0 deletions DevelopmentNotes/DevelopmentNotes.fodt
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,61 @@ more cross-platform approach than that used by MMD v5.</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">2017&#8211;04&#8211;09 - v 6.0.4:</text:p>

<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="P1">
ADDED: The &#8216;&#8211;l&#8217; command line argument also sets language, if not overridden by metadata</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Fix regular expression to match table separator lines. (Fixes #50)</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="Standard">FIXED: Improve organization of fallback lines for fenced code blocks and HTML blocks</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="Standard">2017&#8211;03&#8211;29 - v 6.0.3:</text:p>

<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="P1">
ADDED: Script for updating re2c and lemon files</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Recompile lexer using &#8211;8 flag</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Recompile scanners using &#8211;8 flag</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="Standard">FIXED: Don&#8217;t separate out 'à'</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="Standard">2017&#8211;03&#8211;29 - v 6.0.2:</text:p>

<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="P1">
CHANGED: Refactor code slightly</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Remove ASCII non&#8211;breaking space support from lexer</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="Standard">FIXED: Fix quote pairing in compatibility mode</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="Standard">2017&#8211;03&#8211;28 &#8211; v 6.0.1:</text:p></text:list-item>

Expand Down
22 changes: 22 additions & 0 deletions DevelopmentNotes/DevelopmentNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,28 @@ <h3 id="dependencieslibraries">Dependencies/Libraries </h3>
<h3 id="changelog">Changelog </h3>

<ul>
<li><p>2017&#8211;04&#8211;09 - v 6.0.4:</p>

<ul>
<li>ADDED: The &#8216;&#8211;l&#8217; command line argument also sets language, if not overridden by metadata</li>
<li>FIXED: Fix regular expression to match table separator lines. (Fixes #50)</li>
<li>FIXED: Improve organization of fallback lines for fenced code blocks and HTML blocks</li>
</ul></li>
<li><p>2017&#8211;03&#8211;29 - v 6.0.3:</p>

<ul>
<li>ADDED: Script for updating re2c and lemon files</li>
<li>CHANGED: Recompile lexer using &#8211;8 flag</li>
<li>CHANGED: Recompile scanners using &#8211;8 flag</li>
<li>FIXED: Don&#8217;t separate out 'à'</li>
</ul></li>
<li><p>2017&#8211;03&#8211;29 - v 6.0.2:</p>

<ul>
<li>CHANGED: Refactor code slightly</li>
<li>CHANGED: Remove ASCII non&#8211;breaking space support from lexer</li>
<li>FIXED: Fix quote pairing in compatibility mode</li>
</ul></li>
<li><p>2017&#8211;03&#8211;28 &#8211; v 6.0.1:</p></li>
<li><p>CHANGED: Adjust LaTeX support files</p></li>
<li><p>CHANGED: Fix potential bug in tokenize function</p></li>
Expand Down
Binary file modified DevelopmentNotes/DevelopmentNotes.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions DevelopmentNotes/DevelopmentNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,13 @@ more cross-platform approach than that used by MMD v5.

# Changelog #

* 2017-04-09 - v 6.0.4:

* ADDED: The '-l' command line argument also sets language, if not overridden by metadata
* FIXED: Fix regular expression to match table separator lines. (Fixes #50)
* FIXED: Improve organization of fallback lines for fenced code blocks and HTML blocks


* 2017-03-29 - v 6.0.3:

* ADDED: Script for updating re2c and lemon files
Expand Down
Binary file modified QuickStart/QuickStart.epub
Binary file not shown.
15 changes: 15 additions & 0 deletions QuickStart/QuickStart.fodt
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,21 @@ included at the top of the file, one to be included right at the beginning of
the document, and one to be included at the end of the document. If you want
to specify the latex files separately, you can use <text:span text:style-name="Source_20_Text">latex leader</text:span>, <text:span text:style-name="Source_20_Text">latex<text:line-break/>begin</text:span>, and <text:span text:style-name="Source_20_Text">latex footer</text:span>.</text:p>

<text:p text:style-name="Standard">There are new metadata keys for controlling internationalization:</text:p>

<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="Standard"><text:span text:style-name="Source_20_Text">language</text:span> &#8211; specify the content language for a document, using the two
letter code for the language (e.g. <text:span text:style-name="Source_20_Text">en</text:span> for English). Where possible, this
will also set the default <text:span text:style-name="Source_20_Text">quotes language</text:span>.</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="Standard"><text:span text:style-name="Source_20_Text">quotes language</text:span> &#8211; specify which variant of smart quotes to use. Valid
options are <text:span text:style-name="Source_20_Text">dutch</text:span>, <text:span text:style-name="Source_20_Text">french</text:span>, <text:span text:style-name="Source_20_Text">german</text:span>, <text:span text:style-name="Source_20_Text">germanguillemets</text:span>, <text:span text:style-name="Source_20_Text">swedish</text:span>, <text:span text:style-name="Source_20_Text">nl</text:span>,
<text:span text:style-name="Source_20_Text">fr</text:span>, <text:span text:style-name="Source_20_Text">de</text:span>, <text:span text:style-name="Source_20_Text">sv</text:span>. Anything else defaults to English.</text:p></text:list-item>

</text:list>

<text:h text:outline-level="4"><text:bookmark text:name="tableofcontents"/>Table of Contents </text:h>

<text:p text:style-name="Standard">By placing <text:span text:style-name="Source_20_Text">{{TOC}}</text:span> in your document, you can insert an automatically
Expand Down
11 changes: 11 additions & 0 deletions QuickStart/QuickStart.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,17 @@ <h4 id="metadata">Metadata </h4>
to specify the latex files separately, you can use <code>latex leader</code>, <code>latex
begin</code>, and <code>latex footer</code>.</p>

<p>There are new metadata keys for controlling internationalization:</p>

<ul>
<li><p><code>language</code> &#8211; specify the content language for a document, using the two
letter code for the language (e.g. <code>en</code> for English). Where possible, this
will also set the default <code>quotes language</code>.</p></li>
<li><p><code>quotes language</code> &#8211; specify which variant of smart quotes to use. Valid
options are <code>dutch</code>, <code>french</code>, <code>german</code>, <code>germanguillemets</code>, <code>swedish</code>, <code>nl</code>,
<code>fr</code>, <code>de</code>, <code>sv</code>. Anything else defaults to English.</p></li>
</ul>

<h4 id="tableofcontents">Table of Contents </h4>

<p>By placing <code>{{TOC}}</code> in your document, you can insert an automatically
Expand Down
Binary file modified QuickStart/QuickStart.pdf
Binary file not shown.
10 changes: 10 additions & 0 deletions QuickStart/QuickStart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,16 @@ the document, and one to be included at the end of the document. If you want
to specify the latex files separately, you can use `latex leader`, `latex
begin`, and `latex footer`.

There are new metadata keys for controlling internationalization:

* `language` -- specify the content language for a document, using the two
letter code for the language (e.g. `en` for English). Where possible, this
will also set the default `quotes language`.

* `quotes language` -- specify which variant of smart quotes to use. Valid
options are `dutch`, `french`, `german`, `germanguillemets`, `swedish`, `nl`,
`fr`, `de`, `sv`. Anything else defaults to English.


## Table of Contents ##

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: | 2017-03-29 |
| Date: | 2017-04-09 |
| Copyright: | Copyright © 2016 - 2017 Fletcher T. Penney. |
| Version: | 6.0.3 |
| Version: | 6.0.4 |


## An Announcement! ##
Expand Down
21 changes: 20 additions & 1 deletion Sources/libMultiMarkdown/epub.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#include "d_string.h"
#include "epub.h"
#include "html.h"
#include "i18n.h"
#include "miniz.h"
#include "mmd.h"
#include "transclude.h"
Expand Down Expand Up @@ -153,7 +154,25 @@ char * epub_package_document(scratch_pad * scratch) {
mmd_print_string_html(out, m->value, false);
print_const("</dc:language>\n");
} else {
print_const("<dc:language>en</dc:language>\n");
switch(scratch->language) {
case LC_ES:
print_const("<dc:language>es</dc:language>\n");
break;
case LC_DE:
print_const("<dc:language>de</dc:language>\n");
break;
case LC_FR:
print_const("<dc:language>fr</dc:language>\n");
break;
case LC_NL:
print_const("<dc:language>nl</dc:language>\n");
break;
case LC_SV:
print_const("<dc:language>sv</dc:language>\n");
break;
default:
print_const("<dc:language>en</dc:language>\n");
}
}

// Date
Expand Down
22 changes: 20 additions & 2 deletions Sources/libMultiMarkdown/html.c
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,25 @@ void mmd_start_complete_html(DString * out, const char * source, scratch_pad * s
if (m) {
printf(" lang=\"%s\"", m->value);
} else {
print_const(" lang=\"en\"");
switch(scratch->language) {
case LC_ES:
print_const(" lang=\"es\"");
break;
case LC_DE:
print_const(" lang=\"de\"");
break;
case LC_FR:
print_const(" lang=\"fr\"");
break;
case LC_NL:
print_const(" lang=\"nl\"");
break;
case LC_SV:
print_const(" lang=\"sv\"");
break;
default:
print_const(" lang=\"en\"");
}
}
print_const(">\n<head>\n\t<meta charset=\"utf-8\"/>\n");

Expand All @@ -1739,7 +1757,7 @@ void mmd_start_complete_html(DString * out, const char * source, scratch_pad * s
print(m->value);
print_char('\n');
} else if (strcmp(m->key, "htmlheaderlevel") == 0) {
} else if (strcmp(m->key, "lang") == 0) {
} else if (strcmp(m->key, "language") == 0) {
} else if (strcmp(m->key, "latexbegin") == 0) {
} else if (strcmp(m->key, "latexconfig") == 0) {
} else if (strcmp(m->key, "latexfooter") == 0) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/libMultiMarkdown/latex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ void mmd_start_complete_latex(DString * out, const char * source, scratch_pad *
} else if (strcmp(m->key, "htmlfooter") == 0) {
} else if (strcmp(m->key, "htmlheader") == 0) {
} else if (strcmp(m->key, "htmlheaderlevel") == 0) {
} else if (strcmp(m->key, "lang") == 0) {
} else if (strcmp(m->key, "language") == 0) {
} else if (strcmp(m->key, "latexbegin") == 0) {
} else if (strcmp(m->key, "latexconfig") == 0) {
} else if (strcmp(m->key, "latexheader") == 0) {
Expand Down
1 change: 0 additions & 1 deletion Sources/libMultiMarkdown/odf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1902,7 +1902,6 @@ void mmd_start_complete_odf(DString * out, const char * source, scratch_pad * sc
} else if (strcmp(m->key, "htmlfooter") == 0) {
} else if (strcmp(m->key, "htmlheader") == 0) {
} else if (strcmp(m->key, "htmlheaderlevel") == 0) {
} else if (strcmp(m->key, "lang") == 0) {
} else if (strcmp(m->key, "language") == 0) {
} else if (strcmp(m->key, "latexbegin") == 0) {
} else if (strcmp(m->key, "latexconfig") == 0) {
Expand Down
Loading

0 comments on commit f073b8d

Please sign in to comment.