diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-02-27 20:43:46 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-02-27 20:43:46 -0800 |
commit | 4af0266a3540f9b8178105e30c501f4f9b6b697f (patch) | |
tree | 46cdadf7312cc592be9ee970c6905acffee913f4 | |
parent | 96bda566ccf21b7762757fb745f1fc0031e89476 (diff) | |
parent | 677309d11172f59044672edf112ad3a5f2eacc21 (diff) |
Merge pull request #107 from krytarowski/netbsd-support-1
NetBSD build fixes
-rw-r--r-- | man/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/commonmark.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index 443996e..e0acd75 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -1,8 +1,10 @@ if (NOT MSVC) + +include(GNUInstallDirs) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1 - DESTINATION share/man/man1) + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man3/cmark.3 - DESTINATION share/man/man3) + DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) endif(NOT MSVC) - diff --git a/src/commonmark.c b/src/commonmark.c index 60b745c..0667519 100644 --- a/src/commonmark.c +++ b/src/commonmark.c @@ -273,8 +273,8 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node, // begin or end with a blank line, and code isn't // first thing in a list item if (info_len == 0 && - (code_len > 2 && !isspace(code[0]) && - !(isspace(code[code_len - 1]) && isspace(code[code_len - 2]))) && + (code_len > 2 && !isspace((unsigned char)code[0]) && + !(isspace((unsigned char)code[code_len - 1]) && isspace((unsigned char)code[code_len - 2]))) && !(node->prev == NULL && node->parent && node->parent->type == CMARK_NODE_ITEM)) { LIT(" "); |