Merge pull request #6 from progsource/make-sure-that-all-block-parsers-are-finished

Make sure that all block parsers are finished
Tento commit je obsažen v:
Petra Baranski 2018-01-18 19:23:29 +01:00 odevzdal GitHub
revize 04342d813c
V databázi nebyl nalezen žádný známý klíč pro tento podpis
ID GPG klíče: 4AEE18F83AFDEB23
3 změnil soubory, kde provedl 14 přidání a 2 odebrání

Zobrazit soubor

@ -27,7 +27,7 @@ file(GLOB_RECURSE MADDY_TESTS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/maddy/*.cp
set( set(
CMAKE_CXX_FLAGS 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"
) )
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------

Zobrazit soubor

@ -1,7 +1,7 @@
# maddy # maddy
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![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) [![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. maddy is a C++ Markdown to HTML **header-only** parser library.

Zobrazit soubor

@ -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; return result;
} }