Skip to content

Commit

Permalink
Merge branch 'release/6.0.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
fletcher committed May 2, 2017
2 parents f073b8d + 91be18f commit 2cffe40
Show file tree
Hide file tree
Showing 77 changed files with 11,314 additions and 6,065 deletions.
22 changes: 15 additions & 7 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-04-09")
set (My_Project_Revised_Date "2017-05-02")
set (My_Project_Version_Major 6)
set (My_Project_Version_Minor 0)
set (My_Project_Version_Patch 4)
set (My_Project_Version_Patch 5)

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

Expand Down Expand Up @@ -52,6 +52,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions("-fbracket-depth=264")
endif()

set(CMAKE_SUPPRESS_REGENERATION 1)


# =================
# Macro Definitions
Expand All @@ -66,15 +68,16 @@ MACRO(ADD_PUBLIC_HEADER target filename)
# the workflow as appropriate, since there is only one
# public_header_files list.

SET_TARGET_PROPERTIES(${target} PROPERTIES PUBLIC_HEADER ${filename})
# This should only be run once per target
# SET_TARGET_PROPERTIES(${target} PROPERTIES PUBLIC_HEADER ${filename})

LIST(APPEND public_header_files ${filename})

SET_SOURCE_FILES_PROPERTIES(
${filename}
PROPERTIES
MACOSX_PACKAGE_LOCATION
PUBLIC_HEADER
include/\${PRODUCT_NAME}
)

# Set Xcode project to configure public header location to allow
Expand Down Expand Up @@ -453,12 +456,17 @@ if (DEFINED SHAREDBUILD)

endif (DEFINED SHAREDBUILD)

# remove the extra "lib" from "liblibFOO"
SET_TARGET_PROPERTIES(libMultiMarkdown PROPERTIES
PREFIX ""
FRAMEWORK TRUE
FRAMEWORK_VERSION A
MACOSX_FRAMEWORK_IDENTIFIER net.multimarkdown.mmd6
)

ADD_PUBLIC_HEADER(libMultiMarkdown Sources/libMultiMarkdown/include/libMultiMarkdown.h)
ADD_PUBLIC_HEADER(libMultiMarkdown Sources/libMultiMarkdown/include/d_string.h)

# remove the extra "lib" from "liblibFOO"
SET_TARGET_PROPERTIES(libMultiMarkdown PROPERTIES PREFIX "")
ADD_PUBLIC_HEADER(libMultiMarkdown Sources/libMultiMarkdown/include/token.h)

# Create a command-line app?
# if (NOT DEFINED TEST)
Expand Down
Binary file modified DevelopmentNotes/DevelopmentNotes.epub
Binary file not shown.
61 changes: 61 additions & 0 deletions DevelopmentNotes/DevelopmentNotes.fodt
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,67 @@ 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;05&#8211;02 - v 6.0.5:</text:p>

<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="P1">
ADDED: Add back support for BibTeX bibliography entries (address #56)</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Adjust &gt; and &lt; in LaTeX output &#8211; don't wrap in math</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Change HTML output for footnotes and citations</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Improve flexibility of HTML Comment parsing (Addresses #25)</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Refactor mmd_engine cleanup</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Remove unnecessary variable</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Rename criticmarkup functions</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Tweak Xcode configuration</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Fix bug in mmd<text:span text:style-name="MMD-Italic">tokenize</text:span>string()</text:p></text:list-item>

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

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

<text:list-item>
<text:p text:style-name="P1">
FIXED: Fix underscore strong/emph around punctuation</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="Standard">FIXED: Reset stacks when parsing</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="Standard">2017&#8211;04&#8211;09 - v 6.0.4:</text:p>

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

<ul>
<li><p>2017&#8211;05&#8211;02 - v 6.0.5:</p>

<ul>
<li>ADDED: Add back support for BibTeX bibliography entries (address #56)</li>
<li>CHANGED: Adjust &gt; and &lt; in LaTeX output &#8211; don't wrap in math</li>
<li>CHANGED: Change HTML output for footnotes and citations</li>
<li>CHANGED: Improve flexibility of HTML Comment parsing (Addresses #25)</li>
<li>CHANGED: Refactor mmd_engine cleanup</li>
<li>CHANGED: Remove unnecessary variable</li>
<li>CHANGED: Rename criticmarkup functions</li>
<li>CHANGED: Tweak Xcode configuration</li>
<li>FIXED: Fix bug in mmd<em>tokenize</em>string()</li>
<li>FIXED: Fix memory leak</li>
<li>FIXED: Fix pointer bug</li>
<li>FIXED: Fix underscore strong/emph around punctuation</li>
<li>FIXED: Improve memory management</li>
<li>FIXED: Reset stacks when parsing</li>
</ul></li>
<li><p>2017&#8211;04&#8211;09 - v 6.0.4:</p>

<ul>
Expand Down
Binary file modified DevelopmentNotes/DevelopmentNotes.pdf
Binary file not shown.
18 changes: 18 additions & 0 deletions DevelopmentNotes/DevelopmentNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,24 @@ more cross-platform approach than that used by MMD v5.

# Changelog #

* 2017-05-02 - v 6.0.5:

* ADDED: Add back support for BibTeX bibliography entries (address #56)
* CHANGED: Adjust > and < in LaTeX output -- don't wrap in math
* CHANGED: Change HTML output for footnotes and citations
* CHANGED: Improve flexibility of HTML Comment parsing (Addresses #25)
* CHANGED: Refactor mmd_engine cleanup
* CHANGED: Remove unnecessary variable
* CHANGED: Rename criticmarkup functions
* CHANGED: Tweak Xcode configuration
* FIXED: Fix bug in mmd_tokenize_string()
* FIXED: Fix memory leak
* FIXED: Fix pointer bug
* FIXED: Fix underscore strong/emph around punctuation
* FIXED: Improve memory management
* FIXED: Reset stacks when parsing


* 2017-04-09 - v 6.0.4:

* ADDED: The '-l' command line argument also sets language, if not overridden by metadata
Expand Down
Binary file modified QuickStart/QuickStart.epub
Binary file not shown.
26 changes: 25 additions & 1 deletion QuickStart/QuickStart.fodt
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#emphandstrong" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">Emph and Strong <text:tab/>1</text:a></text:p>
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#epub3support" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">EPUB 3 Support <text:tab/>1</text:a></text:p>
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#fencedcodeblocks" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">Fenced Code Blocks <text:tab/>1</text:a></text:p>
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#footnotes" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">Footnotes <text:tab/>1</text:a></text:p>
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#glossaryterms" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">Glossary Terms <text:tab/>1</text:a></text:p>
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#htmlcomments" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">HTML Comments <text:tab/>1</text:a></text:p>
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#internationalization" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">Internationalization <text:tab/>1</text:a></text:p>
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#latexchanges" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">LaTeX Changes <text:tab/>1</text:a></text:p>
<text:p text:style-name="TOC_Item"><text:a xlink:type="simple" xlink:href="#metadata" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">Metadata <text:tab/>1</text:a></text:p>
Expand Down Expand Up @@ -463,7 +465,12 @@ complex abbreviations, you must explicitly mark uses of the abbreviation.</text:

<text:h text:outline-level="4"><text:bookmark text:name="citations"/>Citations </text:h>

<text:p text:style-name="Standard">Citations can be specified using an inline syntax, just like inline footnotes.</text:p>
<text:p text:style-name="Standard">Citations can be specified using an inline syntax, just like inline footnotes.
If you wish to use BibTeX, then configure the <text:span text:style-name="Source_20_Text">bibtex</text:span> metadata (required) and
the <text:span text:style-name="Source_20_Text">biblio style</text:span> metadata (optional).</text:p>

<text:p text:style-name="Standard">The HTML output for citations now uses parentheses instead of brackets, e.g.
<text:span text:style-name="Source_20_Text">(1)</text:span> instead of <text:span text:style-name="Source_20_Text">[1]</text:span>.</text:p>

<text:h text:outline-level="4"><text:bookmark text:name="criticmarkup"/>CriticMarkup </text:h>

Expand Down Expand Up @@ -525,6 +532,11 @@ considered to be part of the code block.</text:p></text:list-item>

</text:list>

<text:h text:outline-level="4"><text:bookmark text:name="footnotes"/>Footnotes </text:h>

<text:p text:style-name="Standard">The HTML output for footnotes now uses superscripts instead of brackets, e.g.
<text:span text:style-name="Source_20_Text">&lt;sup&gt;1&lt;/sup&gt;</text:span> instead of <text:span text:style-name="Source_20_Text">[1]</text:span>.</text:p>

<text:h text:outline-level="4"><text:bookmark text:name="glossaryterms"/>Glossary Terms </text:h>

<text:p text:style-name="Standard">If there are terms in your document you wish to define in a glossary<text:note text:id="gn3" text:note-class="glossary"><text:note-body><text:p text:style-name="Footnote">The
Expand All @@ -545,6 +557,18 @@ case, the term is limited to a more basic character set which includes
letters, numbers, periods, and hyphens, but not much else. For more complex
glossary terms, you must explicitly mark uses of the term.</text:p>

<text:h text:outline-level="4"><text:bookmark text:name="htmlcomments"/>HTML Comments </text:h>

<text:p text:style-name="Standard">Previously, HTML Comments were used by MultiMarkdown to include raw text for
inclusion in the output file. This was useful, but limited, as it could only
work for one output format at a time.</text:p>

<text:p text:style-name="Standard">HTML Comments are now only included in HTML output, but not in any other
format since they would cause errors.</text:p>

<text:p text:style-name="Standard">Take a look at the <text:span text:style-name="Source_20_Text">HTML Comments.text</text:span> file in the test suite for a better
understanding of comment blocks vs comment spans, and how they are parsed.</text:p>

<text:h text:outline-level="4"><text:bookmark text:name="internationalization"/>Internationalization </text:h>

<text:p text:style-name="Standard">MMD v6 includes support for substituting certain text phrases in other
Expand Down
26 changes: 25 additions & 1 deletion QuickStart/QuickStart.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
<li><a href="#emphandstrong">Emph and Strong </a></li>
<li><a href="#epub3support">EPUB 3 Support </a></li>
<li><a href="#fencedcodeblocks">Fenced Code Blocks </a></li>
<li><a href="#footnotes">Footnotes </a></li>
<li><a href="#glossaryterms">Glossary Terms </a></li>
<li><a href="#htmlcomments">HTML Comments </a></li>
<li><a href="#internationalization">Internationalization </a></li>
<li><a href="#latexchanges">LaTeX Changes </a></li>
<li><a href="#metadata">Metadata </a></li>
Expand Down Expand Up @@ -177,7 +179,12 @@ <h4 id="abbreviationsoracronyms">Abbreviations (Or Acronyms) </h4>

<h4 id="citations">Citations </h4>

<p>Citations can be specified using an inline syntax, just like inline footnotes.</p>
<p>Citations can be specified using an inline syntax, just like inline footnotes.
If you wish to use BibTeX, then configure the <code>bibtex</code> metadata (required) and
the <code>biblio style</code> metadata (optional).</p>

<p>The HTML output for citations now uses parentheses instead of brackets, e.g.
<code>(1)</code> instead of <code>[1]</code>.</p>

<h4 id="criticmarkup">CriticMarkup </h4>

Expand Down Expand Up @@ -235,6 +242,11 @@ <h4 id="fencedcodeblocks">Fenced Code Blocks </h4>
considered to be part of the code block.</p></li>
</ol>

<h4 id="footnotes">Footnotes </h4>

<p>The HTML output for footnotes now uses superscripts instead of brackets, e.g.
<code>&lt;sup&gt;1&lt;/sup&gt;</code> instead of <code>[1]</code>.</p>

<h4 id="glossaryterms">Glossary Terms </h4>

<p>If there are terms in your document you wish to define in a <a href="#gn:3" id="gnref:3" title="see glossary" class="glossary">glossary</a> at
Expand All @@ -261,6 +273,18 @@ <h4 id="glossaryterms">Glossary Terms </h4>
letters, numbers, periods, and hyphens, but not much else. For more complex
glossary terms, you must explicitly mark uses of the term.</p>

<h4 id="htmlcomments">HTML Comments </h4>

<p>Previously, HTML Comments were used by MultiMarkdown to include raw text for
inclusion in the output file. This was useful, but limited, as it could only
work for one output format at a time.</p>

<p>HTML Comments are now only included in HTML output, but not in any other
format since they would cause errors.</p>

<p>Take a look at the <code>HTML Comments.text</code> file in the test suite for a better
understanding of comment blocks vs comment spans, and how they are parsed.</p>

<h4 id="internationalization">Internationalization </h4>

<p><abbr title="MultiMarkdown">MMD</abbr> v6 includes support for substituting certain text phrases in other
Expand Down
Binary file modified QuickStart/QuickStart.pdf
Binary file not shown.
24 changes: 24 additions & 0 deletions QuickStart/QuickStart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ complex abbreviations, you must explicitly mark uses of the abbreviation.
## Citations ##

Citations can be specified using an inline syntax, just like inline footnotes.
If you wish to use BibTeX, then configure the `bibtex` metadata (required) and
the `biblio style` metadata (optional).

The HTML output for citations now uses parentheses instead of brackets, e.g.
`(1)` instead of `[1]`.


## CriticMarkup ##
Expand Down Expand Up @@ -219,6 +224,12 @@ complex parser.
considered to be part of the code block.


## Footnotes ##

The HTML output for footnotes now uses superscripts instead of brackets, e.g.
`<sup>1</sup>` instead of `[1]`.


## Glossary Terms ##

If there are terms in your document you wish to define in a [?(glossary) The
Expand Down Expand Up @@ -246,6 +257,19 @@ letters, numbers, periods, and hyphens, but not much else. For more complex
glossary terms, you must explicitly mark uses of the term.


## HTML Comments ##

Previously, HTML Comments were used by MultiMarkdown to include raw text for
inclusion in the output file. This was useful, but limited, as it could only
work for one output format at a time.

HTML Comments are now only included in HTML output, but not in any other
format since they would cause errors.

Take a look at the `HTML Comments.text` file in the test suite for a better
understanding of comment blocks vs comment spans, and how they are parsed.


## Internationalization ##

MMD v6 includes support for substituting certain text phrases in other
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-04-09 |
| Date: | 2017-05-02 |
| Copyright: | Copyright © 2016 - 2017 Fletcher T. Penney. |
| Version: | 6.0.4 |
| Version: | 6.0.5 |


## An Announcement! ##
Expand Down
8 changes: 4 additions & 4 deletions Sources/libMultiMarkdown/critic_markup.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#include "token_pairs.h"


token * critic_tokenize_string(const char * source, size_t start, size_t len) {
token * mmd_critic_tokenize_string(const char * source, size_t start, size_t len) {
trie * ac = trie_new(0);

trie_insert(ac, "{++", CM_ADD_OPEN);
Expand Down Expand Up @@ -124,7 +124,7 @@ token * critic_tokenize_string(const char * source, size_t start, size_t len) {


token * critic_parse_substring(const char * source, size_t start, size_t len) {
token * chain = critic_tokenize_string(source, start, len);
token * chain = mmd_critic_tokenize_string(source, start, len);

if (chain) {
token_pair_engine * e = token_pair_engine_new();
Expand Down Expand Up @@ -211,7 +211,7 @@ void accept_token_tree(DString * d, token * t) {
}
}

void critic_markup_accept(DString * d) {
void mmd_critic_markup_accept(DString * d) {
token * t = critic_parse_substring(d->str, 0, d->currentStringLength);

if (t && t->child)
Expand Down Expand Up @@ -282,7 +282,7 @@ void reject_token_tree(DString * d, token * t) {
}
}

void critic_markup_reject(DString * d) {
void mmd_critic_markup_reject(DString * d) {
token * t = critic_parse_substring(d->str, 0, d->currentStringLength);

if (t && t->child)
Expand Down
4 changes: 2 additions & 2 deletions Sources/libMultiMarkdown/critic_markup.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ enum cm_types {
};


void critic_markup_accept(DString * d);
void mmd_critic_markup_accept(DString * d);

void critic_markup_reject(DString * d);
void mmd_critic_markup_reject(DString * d);

#endif
Loading

0 comments on commit 2cffe40

Please sign in to comment.