From 9a9774f90463c282e15707f7d89450f7cd970fc6 Mon Sep 17 00:00:00 2001 From: "M. Petra Baranski" Date: Thu, 18 Jan 2018 19:09:10 +0100 Subject: [PATCH 1/2] make sure that all parsers are finished --- CMakeLists.txt | 2 +- include/maddy/parser.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d17319a..634dfc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ file(GLOB_RECURSE MADDY_TESTS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/maddy/*.cp set( CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -g -std=c++${MADDY_CPP_VERSION} -Wall -Wpedantic -Wextra -Wno-ignored-qualifiers -fno-rtti -fno-exceptions" + "${CMAKE_CXX_FLAGS} -g -std=c++${MADDY_CPP_VERSION} -Wall -Wpedantic -Wextra -Wno-ignored-qualifiers -fno-rtti -fno-exceptions -fsanitize=address -fno-omit-frame-pointer" ) # ------------------------------------------------------------------------------ diff --git a/include/maddy/parser.h b/include/maddy/parser.h index f1b6f34..b152646 100644 --- a/include/maddy/parser.h +++ b/include/maddy/parser.h @@ -93,6 +93,18 @@ public: } } + // make sure, that all parsers are finished + if (currentBlockParser) + { + std::string emptyLine = ""; + currentBlockParser->AddLine(emptyLine); + if (currentBlockParser->IsFinished()) + { + result += currentBlockParser->GetResult().str(); + currentBlockParser = nullptr; + } + } + return result; } From e20ac6c51438448a64d3cad8edaa81ee0cf83ee6 Mon Sep 17 00:00:00 2001 From: "M. Petra Baranski" Date: Thu, 18 Jan 2018 19:09:39 +0100 Subject: [PATCH 2/2] update version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4951869..d94f525 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # maddy [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-brightgreen.svg)](https://semver.org/) +[![Version: 1.0.3](https://img.shields.io/badge/Version-1.0.3-brightgreen.svg)](https://semver.org/) [![Build Status](https://travis-ci.org/progsource/maddy.svg?branch=master)](https://travis-ci.org/progsource/maddy) maddy is a C++ Markdown to HTML **header-only** parser library.