From 91bfdee36c41c1b5c206359bf9b67bf61e4a3b68 Mon Sep 17 00:00:00 2001 From: noureddin Date: Thu, 22 Aug 2024 16:37:17 +0300 Subject: [PATCH] small fixes in the deirab/unmark routine --- .quran.js | 14 +++++++++----- index.html | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.quran.js b/.quran.js index c132bb0..2987b56 100644 --- a/.quran.js +++ b/.quran.js @@ -3,10 +3,10 @@ const aayaat_logic = (function () { const unmark = (phrase) => phrase // remove mosħaf formatting signs .r(/\xa0\u06dd[٠-٩]+(?:\xa0\u06e9)?/, '') // ayah number & sajda if any - .r(/\u06de\xa0/, '') // start of rub el hizb if found - .r(/[\u06D6-\u06DC] /, '') // waqf signs - .r(/\u0305/g, '') // combining overline - .r(/^(.)\u0651/g, '$1') // initial shadda-of-idgham + .r(/\u06de\xa0/, '') // start of rub el hizb if found + .r(/[\u06D6-\u06DC] /, '') // waqf signs + .r(/\u0305/g, '') // combining overline + .r(/^(.)\u0651/g, '$1') // initial shadda-of-idgham // remove final tashkeel signs (except shadda) .r(/[\u06e4-\u06e6]+$/g, '') // madd-monfasel & madd sela .r(/\u06e1$/, '') // jazm (quranic sukun) @@ -15,11 +15,15 @@ const unmark = (phrase) => phrase .r(/[\u08f1\u08f2]$/, '') // open tanween {damm, kasr} .r(/\u064f\u06e2$/, '') // iqlab tanween damm .r(/\u0650\u06ed$/, '') // iqlab tanween kasr + .r(/\u06e2$/, '') // iqlab on final noon + .r(/(ا)\u06df$/, '$1') // remove rounded zero from final alef + .r(/(ى)\u0670$/, '$1') // remove dagger alef from final alef maqsura + // (its existence depends on the first letter of the next word) .r(/\u064b([اى]?)$/, '$1') // tanween fath .r(/\u08f0([اى]?)$/, '$1') // open tanween fath .r(/\u064e\u06e2([اى]?)$/, '$1') // iqlab tanween fath .r(/\u064e([اى]?)$/, '$1') // just fath, before final alef (either kind), because of tanween (eg, إذا) - .r(/(ى)\u0670$/, '$1') // dagger alef from final alef maqsura (its existence depends on the first letter of the next word) + .r(/\u06e4(ا)$/, '$1') // madd before the final silent alef after waw function phrasify ([ title, aayaat ]) { // equiv. to: return ayat.flatMap(a => a.split(/(?<=[\u06D6-\u06DC] |\n)/)) diff --git a/index.html b/index.html index fb23e9f..4aca7ce 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,3 @@ إحكام - اختبر حفظك للقرآن الكريم بترتيب أجزاء الآيات

Codeتواصلتطبيق مراجعة القرآن الكريم (رسيت Recite)التطبيقات الأخرى

\ No newline at end of file +الاختبار

Codeتواصلتطبيق مراجعة القرآن الكريم (رسيت Recite)التطبيقات الأخرى

\ No newline at end of file