diff --git a/src/task.h b/src/task.h index 6290cfb68..5dacbd4c3 100644 --- a/src/task.h +++ b/src/task.h @@ -112,7 +112,6 @@ void wrapText (std::vector &, const std::string&, const int); std::string trimLeft (const std::string& in, const std::string& t = " "); std::string trimRight (const std::string& in, const std::string& t = " "); std::string trim (const std::string& in, const std::string& t = " "); -void extractParagraphs (const std::string&, std::vector&); void extractLine (std::string&, std::string&, int); void split (std::vector&, const std::string&, const char); void split (std::vector&, const std::string&, const std::string&); diff --git a/src/tests/utf8.t b/src/tests/utf8.t index 60b1eea82..6fd87f78f 100755 --- a/src/tests/utf8.t +++ b/src/tests/utf8.t @@ -41,6 +41,7 @@ if (open my $fh, '>', 'utf8.rc') # Add a task with UTF8 in the description. qx{../task rc:utf8.rc add Çirçös}; qx{../task rc:utf8.rc add Hello world ☺}; +qx{../task rc:utf8.rc add ¥£€$¢₡₢₣₤₥₦₧₨₩₪₫₭₮₯}; qx{../task rc:utf8.rc add Pchnąć w tę łódź jeża lub ośm skrzyń fig}; qx{../task rc:utf8.rc add ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า}; qx{../task rc:utf8.rc add イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム}; @@ -58,7 +59,7 @@ qx{../task rc:utf8.rc add Ξεσκεπάζω τὴν ψυχοφθόρα βδελ my $output = qx{../task rc:utf8.rc ls}; diag ($output); -like ($output, qr/16/, 'all 16 tasks shown'); +like ($output, qr/17/, 'all 17 tasks shown'); # Cleanup. unlink 'pending.data'; diff --git a/src/text.cpp b/src/text.cpp index f18fec8e4..fced0b0aa 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -104,28 +104,6 @@ void join ( } } -//////////////////////////////////////////////////////////////////////////////// -void extractParagraphs (const std::string& input, std::vector& output) -{ - std::string copy = input; - while (1) - { - size_t so = copy.find ("

"); - size_t eo = copy.find ("

"); - - if (so == std::string::npos && eo == std::string::npos) - break; - - std::string extract = trim (copy.substr (so + 3, eo - so - 3)); - copy = copy.substr (eo + 4, std::string::npos); - output.push_back (extract); - } - - // There were no paragraphs. - if (!output.size ()) - output.push_back (input); -} - //////////////////////////////////////////////////////////////////////////////// std::string trimLeft (const std::string& in, const std::string& t /*= " "*/) {