mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2024-11-23 00:33:44 +00:00
Eat up the last newline in a pastie if present.
This commit is contained in:
parent
eb02bd617b
commit
9f20c4885d
1 changed files with 3 additions and 0 deletions
|
@ -90,6 +90,9 @@ namespace kamokan {
|
|||
using boost::adaptors::transformed;
|
||||
using MatchRange = boost::iterator_range<string_view_iterator>;
|
||||
|
||||
if (not parPastie.empty() and parPastie[parPastie.size() - 1] == '\n')
|
||||
parPastie = parPastie.substr(0, parPastie.size() - 1);
|
||||
|
||||
int line_num = 1;
|
||||
return boost::copy_range<mstch::array>(
|
||||
boost::make_iterator_range(
|
||||
|
|
Loading…
Reference in a new issue