diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-02-01 13:50:21 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-02-01 13:50:21 -0500 |
| commit | 76472b71ecb287b7a3bb5759770d71cdd1623a20 (patch) | |
| tree | 4aff2984b2040d42282c62aa15ee79f8298b21ab | |
| parent | 8be8513a29b277d7919c3033840611ce25b213ce (diff) | |
| download | rawr-ebooks-76472b71ecb287b7a3bb5759770d71cdd1623a20.tar.gz rawr-ebooks-76472b71ecb287b7a3bb5759770d71cdd1623a20.tar.bz2 rawr-ebooks-76472b71ecb287b7a3bb5759770d71cdd1623a20.zip | |
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.
| -rw-r--r-- | kgramstats.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
| 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) | |||
| 468 | case parentype::asterisk: result = "*" + result; break; | 468 | case parentype::asterisk: result = "*" + result; break; |
| 469 | case parentype::quote: result = "\"" + result; break; | 469 | case parentype::quote: result = "\"" + result; break; |
| 470 | } | 470 | } |
| 471 | } else { | ||
| 472 | open_delimiters.pop(); | ||
| 471 | } | 473 | } |
| 472 | 474 | ||
| 473 | switch (dt.first.type) | 475 | switch (dt.first.type) |
