From 03f3337e231581e87cd5cf6fc7c1306b77f224b1 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Tue, 14 Nov 2023 18:40:00 +0100 Subject: [PATCH] fix: Fix sample for index() The sample previously used stores that weren't defined. --- developer/language/reference/_index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/developer/language/reference/_index.php b/developer/language/reference/_index.php index b4d583092..0a3b9fe00 100644 --- a/developer/language/reference/_index.php +++ b/developer/language/reference/_index.php @@ -46,21 +46,21 @@

This example maps a vowel, followed by a diacritic key, to the same vowel, and a corresponding combining diacritic mark.

store(vowel) "aeiou"
 store(diacritickey) "`'^"
-store(diacritic) U+0300 U+0301 U+0302
+store(diacriticCombining) U+0300 U+0301 U+0302
 
-any(vowel) + any(diacritic) > index(vowel,1) index(diacriticCombining,2)
+any(vowel) + any(diacritickey) > index(vowel,1) index(diacriticCombining,2)
 
 c this could also be expressed with the context statement:
-any(vowel) + any(diacritic) > context index(diacriticCombining,2)
+any(vowel) + any(diacritickey) > context index(diacriticCombining,2)
 

This example does the same as the previous, except it reverses the input order: a diacritic mark first, then a vowel, and uses the index() statement to swap the results in the output.

store(vowel) "aeiou"
 store(diacritickey) "`'^"
-store(diacritic) U+0300 U+0301 U+0302
+store(diacriticCombining) U+0300 U+0301 U+0302
 
-any(diacritic) + any(vowel) > index(vowel,2) index(diacriticCombining,1)
+any(diacritickey) + any(vowel) > index(vowel,2) index(diacriticCombining,1)
 

The following example shows how the index statement can be used in the left hand side of a rule. If a repeating vowel is found, then