Commit c4e6ddc39a1b589459b21f35e5d7113c6ef7b2bc

Martin Mitas 2019-05-20T21:27:20

md2html/render_html.h: Add extern "C" when included in C++. Seems some people desire to use the HTML renderer in C++ projects, so lets make this as the 1st step in making it easy :-)

diff --git a/md2html/render_html.h b/md2html/render_html.h
index 966a746..968dc8e 100644
--- a/md2html/render_html.h
+++ b/md2html/render_html.h
@@ -28,6 +28,11 @@
 
 #include "md4c.h"
 
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
+
 /* If set, debug output from md_parse() is sent to stderr. */
 #define MD_RENDER_FLAG_DEBUG                0x0001
 #define MD_RENDER_FLAG_VERBATIM_ENTITIES    0x0002
@@ -54,4 +59,8 @@ int md_render_html(const MD_CHAR* input, MD_SIZE input_size,
                    void* userdata, unsigned parser_flags, unsigned renderer_flags);
 
 
+#ifdef __cplusplus
+    }  /* extern "C" { */
+#endif
+
 #endif  /* MD4C_RENDER_HTML_H */