summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/CMakeLists.txt8
-rw-r--r--src/commonmark.c4
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(" ");