1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-11-27 00:43:47 +00:00

Eat up the last newline in a pastie if present.

This commit is contained in:
King_DuckZ 2017-06-19 20:22:53 +01:00
parent eb02bd617b
commit 9f20c4885d

View file

@ -90,6 +90,9 @@ namespace kamokan {
using boost::adaptors::transformed; using boost::adaptors::transformed;
using MatchRange = boost::iterator_range<string_view_iterator>; 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; int line_num = 1;
return boost::copy_range<mstch::array>( return boost::copy_range<mstch::array>(
boost::make_iterator_range( boost::make_iterator_range(