[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/10] uniwbrk: Ignore Extended/Format at the beginning of the
From: |
Daiki Ueno |
Subject: |
[PATCH v2 04/10] uniwbrk: Ignore Extended/Format at the beginning of the line |
Date: |
Thu, 23 Oct 2014 17:01:35 +0900 |
* lib/uniwbrk/u-wordbreaks.h (FUNC): Ignore Extend and Format
characters if the previous character property is one of
WBP_NEWLINE, WBP_CR, and WBP_LF.
---
lib/uniwbrk/u-wordbreaks.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/uniwbrk/u-wordbreaks.h b/lib/uniwbrk/u-wordbreaks.h
index 2d88015..33ca7eb 100644
--- a/lib/uniwbrk/u-wordbreaks.h
+++ b/lib/uniwbrk/u-wordbreaks.h
@@ -112,8 +112,13 @@ FUNC (const UNIT *s, size_t n, char *p)
}
last_char_prop = prop;
- /* Ignore Format and Extend characters, except at the start of the
string. */
- if (last_compchar_prop < 0 || !(prop == WBP_EXTEND || prop ==
WBP_FORMAT))
+ /* Ignore Format and Extend characters, except at the start
+ of the line. */
+ if (last_compchar_prop < 0
+ || last_compchar_prop == WBP_CR
+ || last_compchar_prop == WBP_LF
+ || last_compchar_prop == WBP_NEWLINE
+ || !(prop == WBP_EXTEND || prop == WBP_FORMAT))
{
secondlast_compchar_prop = last_compchar_prop;
last_compchar_prop = prop;
--
1.9.3
- [PATCH v2 00/10] Update libunistring-related modules to Unicode 7.0.0, Daiki Ueno, 2014/10/23
- [PATCH v2 01/10] gen-uni-tables: Minor style fixes, Daiki Ueno, 2014/10/23
- [PATCH v2 04/10] uniwbrk: Ignore Extended/Format at the beginning of the line,
Daiki Ueno <=
- [PATCH v2 02/10] gen-uni-tables: Check out-of-range values added to 3-level tables, Daiki Ueno, 2014/10/23
- [PATCH v2 05/10] uniwbrk/u32-wordbreaks-tests: Test using WordBreakTest.txt from UCD, Daiki Ueno, 2014/10/23
- [PATCH v2 06/10] uniname: Make codepoint transformation more flexible, Daiki Ueno, 2014/10/23
- [PATCH v2 03/10] unictype/joininggroup-of: Switch to 3-level table, Daiki Ueno, 2014/10/23
- [PATCH v2 07/10] Update to Unicode 6.1.0, Daiki Ueno, 2014/10/23
- [PATCH v2 08/10] Update to Unicode 6.2.0, Daiki Ueno, 2014/10/23
- [PATCH v2 09/10] Update to Unicode 6.3.0, Daiki Ueno, 2014/10/23
- Re: [PATCH v2 00/10] Update libunistring-related modules to Unicode 7.0.0, Pádraig Brady, 2014/10/23