Skip to content

Commit

Permalink
Merge branch 'release/6.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
fletcher committed May 24, 2017
2 parents 2cffe40 + ee143d1 commit 651bbe6
Show file tree
Hide file tree
Showing 22 changed files with 686 additions and 168 deletions.
18 changes: 10 additions & 8 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-05-02")
set (My_Project_Revised_Date "2017-05-24")
set (My_Project_Version_Major 6)
set (My_Project_Version_Minor 0)
set (My_Project_Version_Patch 5)
set (My_Project_Version_Patch 6)

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

Expand Down Expand Up @@ -50,6 +50,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# using Clang
# Default is 256 -- needed for localization hash function
add_definitions("-fbracket-depth=264")
else()
add_definitions("-std=c99")
endif()

set(CMAKE_SUPPRESS_REGENERATION 1)
Expand Down Expand Up @@ -384,9 +386,9 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# You may wish to disable this.
#

set (CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set (BUILD_SHARED_LIBRARIES OFF)
set (CMAKE_EXE_LINKER_FLAGS "-static")
# set (CMAKE_FIND_LIBRARY_SUFFIXES ".a")
# set (BUILD_SHARED_LIBRARIES OFF)
# set (CMAKE_EXE_LINKER_FLAGS "-static")

# Some libraries need to be linked on some Linux builds
if (DEFINED TEST)
Expand Down Expand Up @@ -484,9 +486,9 @@ ADD_PUBLIC_HEADER(libMultiMarkdown Sources/libMultiMarkdown/include/token.h)
set_target_properties(libMultiMarkdown PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO")
set_target_properties(multimarkdown PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO")

# Use C99
set_property(TARGET libMultiMarkdown PROPERTY C_STANDARD 99)
set_property(TARGET multimarkdown PROPERTY C_STANDARD 99)
# Use C11
set_property(TARGET libMultiMarkdown PROPERTY C_STANDARD 11)
set_property(TARGET multimarkdown PROPERTY C_STANDARD 11)


# ==========================
Expand Down
Binary file modified DevelopmentNotes/DevelopmentNotes.epub
Binary file not shown.
89 changes: 87 additions & 2 deletions DevelopmentNotes/DevelopmentNotes.fodt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
<office:meta>
<dc:title>MultiMarkdown v6 Development Notes</dc:title>
<meta:user-defined meta:name="author">Fletcher T. Penney</meta:user-defined>
<meta:user-defined meta:name="date">2017-03-28</meta:user-defined>
<meta:user-defined meta:name="date">2017-05-24</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 @@ -755,6 +755,91 @@ 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;24 - v 6.0.6:</text:p>

<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="P1">
ADDED: Add function for accessing library version</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
ADDED: Restructure superscript</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Continue to refactor core API routines for clarity and flexibility</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Don't strip list markers from nested list items</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Extended ASCII support interferes with UTF&#8211;8 support &#8211; disable it</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Preserve closing Heading markers</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Refactor CriticMarkup basic commands to be part of libMultiMarkdown.h</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Refactor code for more consistent API naming in libMultiMarkdown.h; Add functionality to list metadata keys and extract specific metadata values</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Refactor transclude_source to be part of main libMultiMarkdown.h</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
CHANGED: Restructure strong/emph to a nested structure</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: Adjust CMake configuration for Linux to allow building with libcurl</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="P1">
FIXED: Need separate check for escaped characters in CriticMarkup parsing</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
FIXED: compiling with older gcc and used c standard</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
Merge pull request #61 from silvio/gcc&#8211;build&#8211;fix</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="P1">
Merge pull request #64 from jasedit/feat/add<text:span text:style-name="MMD-Italic">version</text:span>function</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="P1">
UPDATED: Update libMultiMarkdown.h</text:p></text:list-item>

<text:list-item>
<text:p text:style-name="Standard">UPDATED: Update mmd.c</text:p></text:list-item>

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

<text:list-item>
<text:p text:style-name="Standard">2017&#8211;05&#8211;02 - v 6.0.5:</text:p>

Expand Down Expand Up @@ -850,7 +935,7 @@ CHANGED: Recompile lexer using &#8211;8 flag</text:p></text:list-item>
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:p text:style-name="Standard">FIXED: Don&#8217;t separate out &#8216;à&#8217;</text:p></text:list-item>

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

Expand Down
28 changes: 26 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="2017-03-28"/>
<meta name="date" content="2017-05-24"/>
<meta name="uuid" content="dd2d8e76-dc2d-416d-9acd-5395d20871c2"/>
</head>
<body>
Expand Down Expand Up @@ -429,6 +429,30 @@ <h3 id="dependencieslibraries">Dependencies/Libraries </h3>
<h3 id="changelog">Changelog </h3>

<ul>
<li><p>2017&#8211;05&#8211;24 - v 6.0.6:</p>

<ul>
<li>ADDED: Add function for accessing library version</li>
<li>ADDED: Restructure superscript</li>
<li>CHANGED: Continue to refactor core API routines for clarity and flexibility</li>
<li>CHANGED: Don't strip list markers from nested list items</li>
<li>CHANGED: Extended ASCII support interferes with UTF&#8211;8 support &#8211; disable it</li>
<li>CHANGED: Fix style</li>
<li>CHANGED: Preserve closing Heading markers</li>
<li>CHANGED: Refactor CriticMarkup basic commands to be part of libMultiMarkdown.h</li>
<li>CHANGED: Refactor code for more consistent API naming in libMultiMarkdown.h; Add functionality to list metadata keys and extract specific metadata values</li>
<li>CHANGED: Refactor transclude_source to be part of main libMultiMarkdown.h</li>
<li>CHANGED: Restructure strong/emph to a nested structure</li>
<li>FIXED: Adjust CMake configuration for Linux to allow building with libcurl</li>
<li>FIXED: Fix regression in EPUB code refactoring</li>
<li>FIXED: Need separate check for escaped characters in CriticMarkup parsing</li>
<li>FIXED: compiling with older gcc and used c standard</li>
<li>Merge pull request #61 from silvio/gcc&#8211;build&#8211;fix</li>
<li>Merge pull request #64 from jasedit/feat/add<em>version</em>function</li>
<li>NOTE: Remove unnecessary includes</li>
<li>UPDATED: Update libMultiMarkdown.h</li>
<li>UPDATED: Update mmd.c</li>
</ul></li>
<li><p>2017&#8211;05&#8211;02 - v 6.0.5:</p>

<ul>
Expand Down Expand Up @@ -460,7 +484,7 @@ <h3 id="changelog">Changelog </h3>
<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>
<li>FIXED: Don&#8217;t separate out &#8216;à&#8217;</li>
</ul></li>
<li><p>2017&#8211;03&#8211;29 - v 6.0.2:</p>

Expand Down
Binary file modified DevelopmentNotes/DevelopmentNotes.pdf
Binary file not shown.
26 changes: 25 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: 2017-03-28
Date: 2017-05-24
LaTeX Config: tufte-handout
Base Header Level: 3
uuid: dd2d8e76-dc2d-416d-9acd-5395d20871c2
Expand Down Expand Up @@ -466,6 +466,30 @@ more cross-platform approach than that used by MMD v5.

# Changelog #

* 2017-05-24 - v 6.0.6:

* ADDED: Add function for accessing library version
* ADDED: Restructure superscript
* CHANGED: Continue to refactor core API routines for clarity and flexibility
* CHANGED: Don't strip list markers from nested list items
* CHANGED: Extended ASCII support interferes with UTF-8 support -- disable it
* CHANGED: Fix style
* CHANGED: Preserve closing Heading markers
* CHANGED: Refactor CriticMarkup basic commands to be part of libMultiMarkdown.h
* CHANGED: Refactor code for more consistent API naming in libMultiMarkdown.h; Add functionality to list metadata keys and extract specific metadata values
* CHANGED: Refactor transclude_source to be part of main libMultiMarkdown.h
* CHANGED: Restructure strong/emph to a nested structure
* FIXED: Adjust CMake configuration for Linux to allow building with libcurl
* FIXED: Fix regression in EPUB code refactoring
* FIXED: Need separate check for escaped characters in CriticMarkup parsing
* FIXED: compiling with older gcc and used c standard
* Merge pull request #61 from silvio/gcc-build-fix
* Merge pull request #64 from jasedit/feat/add_version_function
* NOTE: Remove unnecessary includes
* UPDATED: Update libMultiMarkdown.h
* UPDATED: Update mmd.c


* 2017-05-02 - v 6.0.5:

* ADDED: Add back support for BibTeX bibliography entries (address #56)
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-05-02 |
| Date: | 2017-05-24 |
| Copyright: | Copyright © 2016 - 2017 Fletcher T. Penney. |
| Version: | 6.0.5 |
| Version: | 6.0.6 |


## An Announcement! ##
Expand Down
16 changes: 8 additions & 8 deletions Sources/libMultiMarkdown/char.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ static unsigned char smart_char_type[256] = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2,
2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 0,
2, 0, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 4, 0, 4, 0,
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 0, 4, 4,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};


Expand Down
4 changes: 4 additions & 0 deletions Sources/libMultiMarkdown/char.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,9 @@ int char_is_whitespace_or_line_ending_or_punctuation(char c);
// Is byte a UTF-8 continuation byte
#define char_is_continuation_byte(x) ((x & 0xC0) == 0x80)

// Is byte the first byte of a multibyte UTF-8 sequence?
#define char_is_lead_multibyte(x) ((x & 0xC0) == 0xC0)


#endif

5 changes: 3 additions & 2 deletions Sources/libMultiMarkdown/char_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#define digit(x) table[x] |= CHAR_DIGIT
#define line_ending(x) table[x] |= CHAR_LINE_ENDING

#define USE_EXTENDED_ASCII_disabled 1

int main( int argc, char** argv ) {
unsigned char table[256] = {0};
Expand Down Expand Up @@ -140,7 +141,7 @@ int main( int argc, char** argv ) {


// Extended ASCII

#ifdef USE_EXTENDED_ASCII
// Punctuation ranges
for (int i = 132; i < 138; ++i) {
punctuation(i);
Expand Down Expand Up @@ -194,7 +195,7 @@ int main( int argc, char** argv ) {
break;
}
}

#endif


// Print output as 16 x 16 table
Expand Down
10 changes: 10 additions & 0 deletions Sources/libMultiMarkdown/critic_markup.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ token * mmd_critic_tokenize_string(const char * source, size_t start, size_t len
trie_insert(ac, "{>>", CM_COM_OPEN);
trie_insert(ac, "<<}", CM_COM_CLOSE);

trie_insert(ac, "\\{", CM_PLAIN_TEXT);
trie_insert(ac, "\\}", CM_PLAIN_TEXT);
trie_insert(ac, "\\{", CM_PLAIN_TEXT);
trie_insert(ac, "\\+", CM_PLAIN_TEXT);
trie_insert(ac, "\\-", CM_PLAIN_TEXT);
trie_insert(ac, "\\~", CM_PLAIN_TEXT);
trie_insert(ac, "\\>", CM_PLAIN_TEXT);
trie_insert(ac, "\\=", CM_PLAIN_TEXT);


ac_trie_prepare(ac);

match * m = ac_trie_leftmost_longest_search(ac, source, start, len);
Expand Down
4 changes: 4 additions & 0 deletions Sources/libMultiMarkdown/html.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,11 +1508,15 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
case PAIR_HTML_COMMENT:
print_token(t);
break;
case PAIR_EMPH:
case PAIR_MATH:
case PAIR_PAREN:
case PAIR_QUOTE_DOUBLE:
case PAIR_QUOTE_SINGLE:
case PAIR_STAR:
case PAIR_STRONG:
case PAIR_SUBSCRIPT:
case PAIR_SUPERSCRIPT:
case PAIR_UL:
mmd_export_token_tree_html(out, source, t->child, scratch);
break;
Expand Down
Loading

0 comments on commit 651bbe6

Please sign in to comment.