diff options
author | Bruno Haible <bruno@clisp.org> | 2021-12-29 00:06:00 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-12-29 00:06:00 +0100 |
commit | c8d8a8ed6f782efbcbdbe90467050c0eb9fb76b3 (patch) | |
tree | b119dfbd91459d8d1c7f3661af57b20014f5db00 /lib | |
parent | d798516dca5a6a6bccf79806c267f8406b0f0757 (diff) | |
download | gnulib-c8d8a8ed6f782efbcbdbe90467050c0eb9fb76b3.tar.gz |
unilbrk: Restore deviation for (IS,AL) pair.
* lib/gen-uni-tables.c (output_lbrk_rules_as_tables): Disable rule LB29.
* lib/unilbrk/lbrktables.c: Regenerated.
* tests/unilbrk/test-u8-possible-linebreaks.c (main): Add test case with
HTML markup.
* tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gen-uni-tables.c | 4 | ||||
-rw-r--r-- | lib/unilbrk/lbrktables.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/gen-uni-tables.c b/lib/gen-uni-tables.c index d9f81943b5..3d1b718067 100644 --- a/lib/gen-uni-tables.c +++ b/lib/gen-uni-tables.c @@ -8149,8 +8149,12 @@ output_lbrk_rules_as_tables (const char *filename, const char *version) /* (LB29) Do not break between numeric punctuation and alphabetics ("e.g."). */ + /* We don't implement this rule, because we find it desirable to break before + the HTML tag "</P>" in strings like "<P>Some sentence.</P>". */ +#if 0 before = LBP_IS; after = LBP_AL; table[before][after].prohibited_no_sp = true; before = LBP_IS; after = LBP_HL; table[before][after].prohibited_no_sp = true; +#endif /* (LB28) Do not break between alphabetics ("at"). */ before = LBP_AL; after = LBP_AL; table[before][after].prohibited_no_sp = true; diff --git a/lib/unilbrk/lbrktables.c b/lib/unilbrk/lbrktables.c index dc6b3931cf..fd72a5cd84 100644 --- a/lib/unilbrk/lbrktables.c +++ b/lib/unilbrk/lbrktables.c @@ -50,7 +50,7 @@ const unsigned char unilbrk_table[30][30] = /* NS */ { P, I, D, I, D, I, P, P, P, D, I, D, I, P, D, D, D, P, D, D, D, D, D, D, D, D, D, D, D, D, }, /* OP */ { P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, }, /* QU */ { P, I, I, I, I, I, P, P, P, I, I, P, I, P, I, I, I, P, I, I, I, I, I, I, I, I, I, I, I, I, }, -/* IS */ { P, I, D, I, D, I, P, P, P, D, I, D, I, P, I, D, D, P, I, D, D, D, D, D, D, I, D, I, D, D, }, +/* IS */ { P, I, D, I, D, I, P, P, P, D, I, D, I, P, I, D, D, P, D, D, D, D, D, D, D, D, D, D, D, D, }, /* NU */ { P, I, D, I, D, I, P, P, P, I, I, I, I, P, I, I, I, P, I, D, D, D, D, D, D, I, D, I, D, D, }, /* PO */ { P, I, D, I, D, I, P, P, P, D, I, I, I, P, I, D, D, P, I, D, D, D, D, D, D, I, D, I, D, D, }, /* PR */ { P, I, D, I, D, I, P, P, P, D, I, I, I, P, I, D, D, P, I, I, I, I, I, I, I, I, D, I, I, I, }, |