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/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. 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; }