diff --git a/CHANGELOG.md b/CHANGELOG.md index fd8243d..02e34bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,31 @@ # MultiMarkdown Change Log # +## [5.1.0] - 2016-02-22 ## + +* ADDED: Add script to build drag and drop apps on OS X +* ADDED: Beginning code for public header file support; ADDED: Beginning configuration for OS X Bundle/Framework targets +* ADDED: Include support for Xcode libraries to be iOS compatible +* CHANGED: Update copyright info for 2016 +* CHANGED: Update test suite +* FIXED: Allow ATX Headers inside lists +* FIXED: Allow 'naturally' aligned table cells like MMD 2 allowed +* FIXED: Allow metadata variables inside links (e.g. [[%foo]][bar]) +* FIXED: Allow newline inside strong/emph (Fixes #10) +* FIXED: Change handling of version.h file for deprecated make to keep it separate from cmake alternative +* FIXED: Don't delete src/version.h +* FIXED: Fix problem with strong/emph matching incorrectly +* FIXED: Fix regression in list/heading fix that was overeager +* FIXED: Include 'fake' version.h for make deprecate +* FIXED: Include additional standard metadata keys in the list to *not* be included in HTML headers +* FIXED: Remove unneeded install directive; FIXED: Fix public header install prefix (I think) +* FIXED: Update MMD test suite for recent table alignment change +* FIXED: fix 'make deprecate' so that it truly doesn't require cmake +* FIXED: Improve tight vs loose list detection with unusual setext headers +* NOTE: Fixed git clone instructions in documentation +* NOTE: Update test suite + + ## [5.0.1] - 2015-12-01 ## * IMPORTANT: Fix major error in last Makefile! (Only in build branch for a few minutes) @@ -54,3 +79,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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 9757417..53396aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,28 +8,106 @@ 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 "2015-12-01") +set (My_Project_Revised_Date "2016-02-22") set (My_Project_Version_Major 5) -set (My_Project_Version_Minor 0) -set (My_Project_Version_Patch 1) +set (My_Project_Version_Minor 1) +set (My_Project_Version_Patch 0) set (My_Project_Version "${My_Project_Version_Major}.${My_Project_Version_Minor}.${My_Project_Version_Patch}") -set (My_Project_Copyright_Date "2013-2015") +set (My_Project_Copyright_Date "2013-2016") set (My_Project_Copyright "Copyright © ${My_Project_Copyright_Date} ${My_Project_Author}.") project (${My_Project_Title}) # Search for included files here +include_directories(${PROJECT_BINARY_DIR}) include_directories( ${PROJECT_SOURCE_DIR}/src ) include_directories( ${PROJECT_SOURCE_DIR}/test ) -include_directories(${PROJECT_BINARY_DIR}) string(TOUPPER ${My_Project_Title} My_Project_Title_Caps ) string(REGEX REPLACE " " "_" My_Project_Title_Caps ${My_Project_Title_Caps} ) +# ================= +# Macro Definitions +# ================= + +MACRO(ADD_PUBLIC_HEADER target filename) + # Add filename to public_header_files list, flag it as + # public header for libraries and OS X Frameworks + + # This will work for creating one library/framework with public headers + # per project. If you need more than one, you will need to customize + # the workflow as appropriate, since there is only one + # public_header_files list. + + 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 + ) + + # Set Xcode project to configure public header location to allow + # use when this project is used in another workspace. + # NOTE: You must manually add a "Headers" build phase and add + # the desired public headers to that list for Xcode to use them. + # + # TODO: If anyone knows how to automate that in Cmake, I would be very + # greatful!! + + SET_TARGET_PROPERTIES(${target} PROPERTIES + XCODE_ATTRIBUTE_PUBLIC_HEADERS_FOLDER_PATH + "include/$(TARGET_NAME)" + ) + + SET_TARGET_PROPERTIES(${target} PROPERTIES + XCODE_ATTRIBUTE_PRIVATE_HEADERS_FOLDER_PATH + "$(PUBLIC_HEADERS_FOLDER_PATH)/Private" + ) + + # Set Xcode target to include settings for OS X and iOS + + SET_TARGET_PROPERTIES(${target} PROPERTIES + XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS + "macos iphonesimulator iphoneos" + ) + + SET_TARGET_PROPERTIES(${target} PROPERTIES + XCODE_ATTRIBUTE_VALID_ARCHITECTURES + "x86_64 i386 armv6 armv7 armv7s arm64" + ) + +ENDMACRO(ADD_PUBLIC_HEADER) + + +# The target should be an OS X Bundle with a PList + +MACRO(MAKE_TARGET_BUNDLE targetname) + + set_target_properties( + ${targetname} + PROPERTIES + MACOSX_BUNDLE_INFO_PLIST + ${PROJECT_SOURCE_DIR}/templates/plist.in + ) + +ENDMACRO(MAKE_TARGET_BUNDLE) + + +MACRO(ADD_LINKED_FRAMEWORK frame) + + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGES} -framework ${frame}") + +ENDMACRO(ADD_LINKED_FRAMEWORK) + + # ====================== # Process Template Files # ====================== @@ -78,11 +156,16 @@ add_custom_command ( set(src_files ) -# primary header files +# Primary header files, also for doxygen documentation set(header_files src/libMultiMarkdown.h ) +# Public headers, will be installed in 'include' +# Do not manually add files here, use the ADD_PUBLIC_HEADER() macro +set(public_header_files +) + # Utility source files will not be included in doxygen set(src_utility_files src/GLibFacade.c @@ -281,6 +364,8 @@ add_library(libMultiMarkdown STATIC # remove the extra "lib" from "liblibFOO" SET_TARGET_PROPERTIES(libMultiMarkdown PROPERTIES PREFIX "") +ADD_PUBLIC_HEADER(libMultiMarkdown src/libMultiMarkdown.h) + # Create command-line app add_executable(multimarkdown src/multimarkdown.c @@ -296,10 +381,6 @@ set_target_properties(multimarkdown PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH # Link the library to the app target_link_libraries(multimarkdown libMultiMarkdown) -# Xcode settings for fat binaries -# set_target_properties(libFOO PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO") -# set_target_properties(main PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO") - # ========================== # Build Installer with CPack @@ -342,9 +423,14 @@ install (FILES ${scripts} PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) -install (FILES ${PROJECT_SOURCE_DIR}/LICENSE.txt ${CMAKE_CURRENT_BINARY_DIR}/README.html - DESTINATION notes -) +# install (FILES ${PROJECT_SOURCE_DIR}/LICENSE.txt ${CMAKE_CURRENT_BINARY_DIR}/README.html +# DESTINATION notes +# ) + +# Use something like this to install public header files (after adding them +# with the ADD_PUBLIC_HEADER() macro) + +# install (FILES ${public_header_files} DESTINATION local/include/libMultiMarkdown) set (CPACK_COMPONENT_SCRIPTS_DISPLAY_NAME "Convenience scripts") set (CPACK_COMPONENT_SCRIPTS_DESCRIPTION diff --git a/Makefile b/Makefile index aea54ff..6419a2a 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,7 @@ documentation: $(BUILD_DIR) $(GREG) .PHONY : clean clean: rm -rf $(BUILD_DIR)/* + -rm src/version.h # Ensure greg is compiled $(GREG): @@ -102,14 +103,14 @@ CHANGELOG: CFLAGS ?= -Wall -g -O3 -include src/GLibFacade.h -include src/version.h -include src/parser.h PROGRAM = multimarkdown -OBJS = build/multimarkdown.o build/parse_utilities.o build/parser.o build/GLibFacade.o build/writer.o build/text.o build/html.o build/latex.o build/memoir.o build/beamer.o build/lyx.o build/lyxbeamer.o build/opml.o build/odf.o build/critic.o build/rng.o build/rtf.o build/transclude.o build/toc.o +OBJS = build/multimarkdown.o build/parse_utilities.o build/parser.o build/GLibFacade.o build/writer.o build/text.o build/html.o build/latex.o build/memoir.o build/beamer.o build/lyx.o build/lyxbeamer.o build/opml.o build/odf.o build/critic.o build/rng.o build/rtf.o build/transclude.o build/toc.o -build/%.o: src/%.c src/parser.h src/version.h +build/%.o: src/%.c src/parser.h src/version.h $(BUILD_DIR) $(CC) -c $(CFLAGS) -o $@ $< src/version.h: $(BUILD_DIR) cd $(BUILD_DIR); touch README.html; \ - cmake -DVERSION_ONLY=1 ..; cd ..; cp build/version.h src/version.h + cp ../tools/version.h ../src/version.h build/parser.o: src/parser.c src/parser.h $(CC) -c $(CFLAGS) -o $@ $< @@ -122,4 +123,4 @@ deprecated: $(GREG) build/$(PROGRAM) build/$(PROGRAM): $(OBJS) $(BUILD_DIR) src/version.h $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS); \ - rm src/parser.c; rm src/version.h + rm src/parser.c diff --git a/README.md b/README.md index f105199..5806f5d 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ | ---------- | ------------------------- | | Title: | MultiMarkdown | | Author: | Fletcher T. Penney | -| Date: | 2015-12-01 | -| Copyright: | Copyright © 2013-2015 Fletcher T. Penney. | -| Version: | 5.0.1 | +| Date: | 2016-02-22 | +| Copyright: | Copyright © 2013-2016 Fletcher T. Penney. | +| Version: | 5.1.0 | ## Introduction ## diff --git a/src/beamer.c b/src/beamer.c index f80460d..3537f8d 100644 --- a/src/beamer.c +++ b/src/beamer.c @@ -2,7 +2,7 @@ beamer.c -- Beamer add-on to LaTeX writer - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License or the MIT diff --git a/src/critic.c b/src/critic.c index 3baa95a..3c56103 100644 --- a/src/critic.c +++ b/src/critic.c @@ -4,7 +4,7 @@ - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License or the MIT diff --git a/src/html.c b/src/html.c index 30dc059..3eedc1b 100644 --- a/src/html.c +++ b/src/html.c @@ -2,7 +2,7 @@ html.c -- HTML writer - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). Derived from peg-multimarkdown, which was forked from peg-markdown, which is (c) 2008 John MacFarlane (jgm at berkeley dot edu), and @@ -46,6 +46,7 @@ void print_html_node(GString *out, node *n, scratch_pad *scratch) { char *width = NULL; char *height = NULL; GString *temp_str; + size_t temp_size; if (n == NULL) return; @@ -256,6 +257,11 @@ void print_html_node(GString *out, node *n, scratch_pad *scratch) { } else if (strcmp(n->str, "mmdfooter") == 0) { } 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, "latexmode") == 0) { + } else if (strcmp(n->str, "latexinput") == 0) { + } else if (strcmp(n->str, "latexfooter") == 0) { + } else if (strcmp(n->str, "bibtex") == 0) { } else { g_string_append_printf(out,"\tstr); print_html_node(out,n->children,scratch); @@ -776,6 +782,7 @@ void print_html_node(GString *out, node *n, scratch_pad *scratch) { scratch->cell_type = 0; scratch->padded = 1; scratch->table_alignment = NULL; + scratch->header_column = 0; break; case TABLESEPARATOR: scratch->table_alignment = n->str; @@ -825,6 +832,10 @@ void print_html_node(GString *out, node *n, scratch_pad *scratch) { } else { temp_type = scratch->cell_type; } + + if (scratch->header_column && (scratch->table_column == 0)) + temp_type = 'h'; + lev = scratch->table_column; if ( strncmp(&temp[lev],"r",1) == 0) { g_string_append_printf(out, "\t"); scratch->padded = 2; + temp_size = out->currentStringLength; print_html_node_tree(out, n->children, scratch); + + /* We have an empty leading cell, so first column is shown as headers */ + /* Disabled for now while I decide whether this should be reimplemented -- was in v2 */ + /* if (scratch->table_column == 0) { + if (temp_size == out->currentStringLength) { + scratch->header_column = 1; + } + } + */ + g_string_append_printf(out, "\n", temp_type); scratch->table_column++; break; @@ -1128,6 +1154,10 @@ void print_col_group(GString *out,scratch_pad *scratch) { g_string_append_printf(out, "\n"); } else if ( strncmp(&temp[lev],"L",1) == 0) { g_string_append_printf(out, "\n"); + } else if ( strncmp(&temp[lev],"N",1) == 0) { + g_string_append_printf(out, "\n"); + } else if ( strncmp(&temp[lev],"n",1) == 0) { + g_string_append_printf(out, "\n"); } else { g_string_append_printf(out, "\n"); } diff --git a/src/latex.c b/src/latex.c index 16e7d0c..1a04aa6 100644 --- a/src/latex.c +++ b/src/latex.c @@ -2,7 +2,7 @@ latex.c -- LaTeX writer - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). Derived from peg-multimarkdown, which was forked from peg-markdown, which is (c) 2008 John MacFarlane (jgm at berkeley dot edu), and @@ -845,8 +845,11 @@ void print_latex_node(GString *out, node *n, scratch_pad *scratch) { case TABLESEPARATOR: temp_str = g_string_new(""); for (i = 0; n->str[i]; i++) { - if (n->str[i] != 'h') + if ((n->str[i] == 'N') || (n->str[i] == 'n')) { + g_string_append_printf(temp_str,"L"); + } else if (n->str[i] != 'h') { g_string_append_printf(temp_str,"%c",toupper(n->str[i])); + } } g_string_append_printf(out, "\\begin{tabulary}{\\textwidth}{@{}%s@{}} \\toprule\n", temp_str->str); diff --git a/src/libMultiMarkdown.h b/src/libMultiMarkdown.h index b4093ca..acd7921 100644 --- a/src/libMultiMarkdown.h +++ b/src/libMultiMarkdown.h @@ -22,7 +22,7 @@ /* - Copyright © 2013-2015 Fletcher T. Penney. + Copyright © 2013-2016 Fletcher T. Penney. The `c-template` project is released under the MIT License. diff --git a/src/lyx.c b/src/lyx.c index e2cab61..62d0c86 100644 --- a/src/lyx.c +++ b/src/lyx.c @@ -1586,6 +1586,8 @@ void print_lyx_node(GString *out, node *n, scratch_pad *scratch, bool no_newline break; case 'l': case 'L': + case 'N': + case 'n': g_string_append(temp_str,"left"); break; } @@ -1667,6 +1669,8 @@ void print_lyx_node(GString *out, node *n, scratch_pad *scratch, bool no_newline break; case 'l': case 'L': + case 'N': + case 'n': g_string_append(temp_str,"left"); break; } diff --git a/src/memoir.c b/src/memoir.c index eae547a..a4eb064 100644 --- a/src/memoir.c +++ b/src/memoir.c @@ -2,7 +2,7 @@ memoir.c -- Memoir add-on to LaTeX writer - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License or the MIT diff --git a/src/multimarkdown.c b/src/multimarkdown.c index 8e412f6..506be63 100644 --- a/src/multimarkdown.c +++ b/src/multimarkdown.c @@ -18,7 +18,7 @@ /* - Copyright © 2013-2015 Fletcher T. Penney. + Copyright © 2013-2016 Fletcher T. Penney. MultiMarkdown 4 and 5 are derived from peg-multimarkdown, which was forked from peg-markdown, which is (c) 2008 John MacFarlane diff --git a/src/odf.c b/src/odf.c index ad090f7..23e8d36 100644 --- a/src/odf.c +++ b/src/odf.c @@ -2,7 +2,7 @@ odf.c -- ODF (Flat OpenDocument format) writer - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License or the MIT diff --git a/src/opml.c b/src/opml.c index a74413f..b3669f8 100644 --- a/src/opml.c +++ b/src/opml.c @@ -2,7 +2,7 @@ opml.c -- OPML add-on to LaTeX writer - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License or the MIT diff --git a/src/parse_utilities.c b/src/parse_utilities.c index 6f85935..1efb8dc 100644 --- a/src/parse_utilities.c +++ b/src/parse_utilities.c @@ -2,7 +2,7 @@ parse_utilities.c -- miscellaneous support functions - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). Derived from peg-multimarkdown, which was forked from peg-markdown, which is (c) 2008 John MacFarlane (jgm at berkeley dot edu), and @@ -263,6 +263,7 @@ scratch_pad * mk_scratch_pad(unsigned long extensions) { result->cell_type = 0; result->table_alignment = NULL; result->table_column = 0; + result->header_column = 0; result->inside_footnote = 0; if (extensions & EXT_RANDOM_FOOT) { diff --git a/src/parser.h b/src/parser.h index 3f51a1a..b14f224 100644 --- a/src/parser.h +++ b/src/parser.h @@ -15,7 +15,7 @@ #define TABSTOP 4 #define MMD_COPYRIGHT \ - "Copyright (c) 2013-2015 Fletcher T. Penney.\n\n" \ + "Copyright (c) 2013-2016 Fletcher T. Penney.\n\n" \ "LyX export code (c) 2013-2014 Charles R. Cowan,\n" \ "licensed under the MIT licenses.\n\n" \ "portions based on peg-markdown - Copyright (c) 2008-2009 John MacFarlane.\n" \ @@ -53,6 +53,7 @@ typedef struct { int table_column; /* Track the current column number */ bool inside_footnote; /* Are we inside a footnote? */ char cell_type; /* What sort of cell type are we in? */ + bool header_column; /* Should the first column be treated like a header? */ bool printing_notes; /* Are we printing notes/glossary/etc.? */ node *notes; /* Store reference notes */ node *links; /* ... links */ diff --git a/src/parser.leg b/src/parser.leg index 6bfb5db..dcc7ff0 100644 --- a/src/parser.leg +++ b/src/parser.leg @@ -4,7 +4,7 @@ parser.leg -> parser.c -- Parse (Multi)Markdown plain text for conversion into other formats - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). Derived from peg-multimarkdown, which was forked from peg-markdown, which is (c) 2008 John MacFarlane (jgm at berkeley dot edu), and @@ -449,7 +449,7 @@ UlOrStarLine = (UlLine | StarLine) { $$ = str(yytext); } StarLine = < "****" '*'* > | < Spacechar '*'+ &Spacechar > UlLine = < "____" '_'* > | < Spacechar '_'+ &Spacechar > -Whitespace = Spacechar | Newline +Whitespace = Spacechar | Newline | Eof Emph = < EmphMatch > { @@ -472,14 +472,14 @@ EmphMatch = &{ !ext(EXT_NO_EMPH) } (EmphStar | EmphUl) EmphStar = '*' !Whitespace (StrongMatch | BracketedText | - (!'*' !BlankLine .) )+ - '*' + (!'*' !(BlankLine BlankLine) .) )+ + '*' &(SpecialChar | Whitespace) EmphUl = '_' !Whitespace (StrongMatch | BracketedText | - (!'_' !BlankLine .) )+ - '_' + (!'_' !(BlankLine BlankLine) .) )+ + '_' &(SpecialChar | Whitespace) Strong = < StrongMatch > { @@ -499,14 +499,14 @@ StrongMatch = &{ !ext(EXT_NO_STRONG) } (StrongStar | StrongUl) StrongStar = "**" !Whitespace (EmphMatch | BracketedText | - (!"**" !BlankLine .) )+ - "**" + (!"**" !(BlankLine BlankLine) .) )+ + "**" &(SpecialChar | Whitespace) StrongUl = "__" !Whitespace (EmphMatch | BracketedText | - (!"__" !BlankLine .) )+ - "__" + (!"__" !(BlankLine BlankLine) .) )+ + "__" &(SpecialChar | Whitespace) StrongAndEmph = EmphAndStrongStar | EmphAndStrongUl @@ -718,7 +718,7 @@ Image = '!' ( !AutoLink Link ) } -Label = < "[" !'[' ( !'^' !'#' &{ ext(EXT_NOTES) } | &. &{ !ext(EXT_NOTES) } ) +Label = < "[" (&"[%" | !'[' ( !'^' !'#' &{ ext(EXT_NOTES) } | &. &{ !ext(EXT_NOTES) } )) a:StartList ( !']' Inline { a = cons($$, a); } )* ']'> @@ -951,7 +951,7 @@ BulletList = &Bullet (ListTight | ListLoose) ListTight = a:StartList ( ListItemTight { a = cons($$, a); } )+ - BlankLine* !(Bullet | Enumerator | BulletNoSpace &EmptyList | EnumeratorNoSpace &EmptyList ) + BlankLine* (&Heading | !(Bullet | Enumerator | BulletNoSpace &EmptyList | EnumeratorNoSpace &EmptyList )) { $$ = list(LIST, a); } @@ -1002,7 +1002,7 @@ EmptyList = BlankLine } ListBlock = a:StartList - ( EmptyList | !Heading Line ) { a = cons($$, a); } + ( EmptyList | !SetextHeading Line ) { a = cons($$, a); } ( ListBlockLine { a = cons($$, a); } )* { $$ = mk_str_from_list(a, false); @@ -1408,9 +1408,15 @@ SeparatorLine = a:StartList HeaderAlignmentCell = Sp ':'? '='+ -AlignmentCell = Sp (!CellDivider ( LeftAlignWrap | CenterAlignWrap | RightAlignWrap | LeftAlign | CenterAlign | RightAlign)) +AlignmentCell = Sp (!CellDivider ( NaturalAlignWrap | LeftAlignWrap | CenterAlignWrap | RightAlignWrap | NaturalAlign | LeftAlign | CenterAlign | RightAlign)) Sp ( CellDivider )? +NaturalAlignWrap = ('-'+ | '='+) '+' &(!'-' !'=' !':') + { $$ = str("N");} + +NaturalAlign = ('-'+ | '='+) &(!'-' !':') + { $$ = str("n");} + LeftAlignWrap = ':'? ('-'+ | '='+) '+' &(!'-' !'=' !':') { $$ = str("L");} diff --git a/src/text.c b/src/text.c index 6a0ab78..f2b2448 100644 --- a/src/text.c +++ b/src/text.c @@ -3,7 +3,7 @@ test.c -- plain text writer function as an example. Recreates the input source. - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License or the MIT diff --git a/src/toc.c b/src/toc.c index 0324a71..00e1b30 100644 --- a/src/toc.c +++ b/src/toc.c @@ -2,7 +2,7 @@ toc.c -- Table of contents - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License or the MIT diff --git a/src/writer.c b/src/writer.c index e3d1187..f4d066f 100644 --- a/src/writer.c +++ b/src/writer.c @@ -3,7 +3,7 @@ writer.c -- General routines for converting parse structure to various output formats. - (c) 2013-2015 Fletcher T. Penney (http://fletcherpenney.net/). + (c) 2013-2016 Fletcher T. Penney (http://fletcherpenney.net/). Derived from peg-multimarkdown, which was forked from peg-markdown, which is (c) 2008 John MacFarlane (jgm at berkeley dot edu), and diff --git a/submodules/MarkdownTest b/submodules/MarkdownTest index 6109cf0..ecf5c61 160000 --- a/submodules/MarkdownTest +++ b/submodules/MarkdownTest @@ -1 +1 @@ -Subproject commit 6109cf0e95d5fcb5a84b4c2e0f2766b506cbbb68 +Subproject commit ecf5c610259b84c066a566f8cdd749ef4ec322ed diff --git a/submodules/documentation b/submodules/documentation index 1242835..311078c 160000 --- a/submodules/documentation +++ b/submodules/documentation @@ -1 +1 @@ -Subproject commit 124283537509815bfc083f1b02c323bf8c4d782b +Subproject commit 311078c131aef960675ed1a5e004c2aab4195222 diff --git a/tools/make_drag_drop_mac.sh b/tools/make_drag_drop_mac.sh new file mode 100644 index 0000000..93ab905 --- /dev/null +++ b/tools/make_drag_drop_mac.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# Run this in terminal (with the Platypus command line tool installed) +# to create drag and drop binaries. NOTE: These rarely need to be +# updated, and rely on whatever version of MultiMarkdown you have +# installed. + +# Modified for Platypus version 5 + +/usr/local/bin/platypus --droppable --quit-after-execution \ +--name 'MMD to HTML' --output-type 'Text Window' --interpreter '/bin/sh' \ +--bundle-identifier net.fletcherpenney.MMD2HTML --suffixes '*' \ +'../scripts/mmd' -y MMD2HTML.app + +/usr/local/bin/platypus --droppable --quit-after-execution \ +--name 'MMD to LaTeX' --output-type 'Text Window' --interpreter '/bin/sh' \ +--bundle-identifier net.fletcherpenney.MMD2LaTeX --suffixes '*' \ +'../scripts/mmd2tex' -y MMD2LaTeX.app + +/usr/local/bin/platypus --droppable --quit-after-execution \ +--name 'MMD to OPML' --output-type 'Text Window' --interpreter '/bin/sh' \ +--bundle-identifier net.fletcherpenney.MMD2OPML --suffixes '*' \ +'../scripts/mmd2opml' -y MMD2OPML.app + +/usr/local/bin/platypus --droppable --quit-after-execution \ +--name 'MMD to ODF' --output-type 'Text Window' --interpreter '/bin/sh' \ +--bundle-identifier net.fletcherpenney.MMD2ODF --suffixes '*' \ +'../scripts/mmd2odf' -y MMD2ODF.app + + diff --git a/tools/version.h b/tools/version.h new file mode 100644 index 0000000..b176f60 --- /dev/null +++ b/tools/version.h @@ -0,0 +1,59 @@ +/* + + ***NOTE*** -- this version of the file is only for use with + "make deprecated". It will not be automatically updated with the latest + version information. + + + version_deprecated.h -- MultiMarkdown + + Copyright © 2013-2016 Fletcher T. Penney. + + + The `c-template` project is released under the MIT License. + + + MMD 5 is released under the MIT License. + + + CuTest is released under the zlib/libpng license. See CuTest.c for the text + of the license. + + + ## The MIT License ## + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +/** + +@file + +@brief MultiMarkdown - lightweight markup processor - project version header + +**/ + + +#ifndef FILE_MULTIMARKDOWN_VERSION_H +#define FILE_MULTIMARKDOWN_VERSION_H + +#define MULTIMARKDOWN_VERSION "5.1.0-dep" + +#endif