From 76472b71ecb287b7a3bb5759770d71cdd1623a20 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 1 Feb 2016 13:50:21 -0500 Subject: Fixed issue where closing opened delimiters wouldn't pop them off the stack This would cause a random quotation mark, for instance, to appear at the end of a tweet if a quote had been opened and closed naturally within the tweet. --- kgramstats.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kgramstats.cpp') diff --git a/kgramstats.cpp b/kgramstats.cpp index 5b571d6..891f4f8 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp @@ -468,6 +468,8 @@ std::string kgramstats::randomSentence(int n) case parentype::asterisk: result = "*" + result; break; case parentype::quote: result = "\"" + result; break; } + } else { + open_delimiters.pop(); } switch (dt.first.type) -- cgit 1.4.1