From 0dcc8770b5370637b430dea9aaa28b5efe59b05f Mon Sep 17 00:00:00 2001 From: anqorithm <61029571+anqorithm@users.noreply.github.com> Date: Mon, 2 Nov 2026 13:31:48 +0100 Subject: [PATCH 1/2] Fix the extended Arabic ranges in HARAKAT_RE Remove the overlapping 08D4 range, which matched U+08E2, and add the combining marks at U+0897-089F and U+08CA-08D3. Signed-off-by: anqorithm <61029571+anqorithm@users.noreply.github.com> --- arabic_reshaper/arabic_reshaper.py | 4 +-- .../tests/test_006_harakat_ranges.py | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 arabic_reshaper/tests/test_006_harakat_ranges.py diff --git a/arabic_reshaper/arabic_reshaper.py b/arabic_reshaper/arabic_reshaper.py index ac954e7..5fa55a3 100644 --- a/arabic_reshaper/arabic_reshaper.py +++ b/arabic_reshaper/arabic_reshaper.py @@ -27,8 +27,8 @@ '\u06d6-\u06dc' '\u06df-\u06e8' '\u06ea-\u06ed' - '\u08d4-\u08e1' - '\u08d4-\u08ed' + '\u0897-\u089f' + '\u08ca-\u08e1' '\u08e3-\u08ff' ']', diff --git a/arabic_reshaper/tests/test_006_harakat_ranges.py b/arabic_reshaper/tests/test_006_harakat_ranges.py new file mode 100644 index 0000000..6f91c01 --- /dev/null +++ b/arabic_reshaper/tests/test_006_harakat_ranges.py @@ -0,0 +1,30 @@ +import unittest + +import arabic_reshaper + + +class TestHarakatRanges(unittest.TestCase): + def setUp(self): + self.keep = arabic_reshaper.ArabicReshaper( + configuration={'delete_harakat': False} + ) + + def test_extended_marks_do_not_break_joining(self): + # Combining marks added in later Unicode versions must not split + # the letters around them. U+FE91 and U+FE90 are initial and + # final beh. + for mark in ('\u0897', '\u089f', '\u08ca', '\u08d0', '\u08d3', + '\u08e1', '\u08e3', '\u08ff'): + with self.subTest(mark='U+%04X' % ord(mark)): + self.assertEqual( + self.keep.reshape('\u0628' + mark + '\u0628'), + '\ufe91' + mark + '\ufe90' + ) + + def test_disputed_end_of_ayah_is_not_a_haraka(self): + # U+08E2 is a format character, so deleting harakat keeps it. + self.assertIn('\u08e2', arabic_reshaper.reshape('\u0628\u08e2')) + + +if __name__ == '__main__': + unittest.main() From 55cc668b97d98c68f6ca6bffe12f1575edf7e83b Mon Sep 17 00:00:00 2001 From: Abdullah Alqahtani <61029571+anqorithm@users.noreply.github.com> Date: Tue, 3 Nov 2026 09:49:40 +0100 Subject: [PATCH 2/2] ci: skip credentialed reviews on fork pull requests --- .github/workflows/claude-code-review.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 37e66f3..cf12df9 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -12,6 +12,7 @@ on: jobs: claude-review: + if: github.event.pull_request.head.repo.full_name == github.repository # Optional: Filter by PR author # if: | # github.event.pull_request.user.login == 'external-contributor' ||