From 79a8de966c2f13faf3bae6f54ea406ea3bb91630 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Champin Date: Thu, 27 Feb 2025 22:53:46 +0100 Subject: [PATCH 1/3] fix #632 --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index a440f6ef..67e75b78 100644 --- a/index.html +++ b/index.html @@ -1996,7 +1996,7 @@

Algorithm

  • Initialize result to an empty map.
  • Initialize default language to @none. If the active context has a default language, - set default language to the default language from the active context + set default language to the default language from the active context normalized to lower case.
  • For each key term and value term definition in the active context, ordered by shortest term @@ -2112,7 +2112,7 @@

    Algorithm

    default base direction:
    1. Initialize a variable lang dir - with the concatenation of default language and default base direction, + with the concatenation of default language and default base direction, separate by an underscore (`"_"`), normalized to lower case.
    2. If language map does not have a lang dir entry, From 57d1ce8586dd775b4b522bfa378151788c98541c Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Champin Date: Thu, 27 Feb 2025 23:38:06 +0100 Subject: [PATCH 2/3] fix #633 This reorders and factorizes some parts of the 'Inverse Content Creation' algorithm. It does not change the behaviour of the algorithm, except for one corner case: if the active context has no default language but has a default base direction, the default combined tag is now _{dir}. In the previous version, it was @none_{dir}. I find this more consistent with steps 3.13.4 and 3.15.1, and I suspect that this former discrepency was actually a bug. --- index.html | 50 +++++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/index.html b/index.html index 67e75b78..dbf5a246 100644 --- a/index.html +++ b/index.html @@ -1994,10 +1994,20 @@

      Algorithm

      1. Initialize result to an empty map.
      2. -
      3. Initialize default language to @none. - If the active context has a default language, - set default language to the default language from the active context - normalized to lower case.
      4. +
      5. Initialize default lang dir as follows:
      6. For each key term and value term definition in the active context, ordered by shortest term first (breaking ties by choosing the lexicographically least @@ -2097,39 +2107,9 @@

        Algorithm

        being processed.
    3. -
    4. Otherwise, if term definition has a - direction mapping (might be null): -
        -
      1. If the direction mapping equals null, - set direction to @none; otherwise - to direction mapping preceded by an underscore (`"_"`).
      2. -
      3. If language map does not have a direction entry, - create one and set its value to the term - being processed.
      4. -
      -
    5. -
    6. Otherwise, if active context has a - default base direction: -
        -
      1. Initialize a variable lang dir - with the concatenation of default language and default base direction, - separate by an underscore (`"_"`), - normalized to lower case.
      2. -
      3. If language map does not have a lang dir entry, - create one and set its value to the term - being processed.
      4. -
      5. If language map does not have an `@none` entry, - create one and set its value to the term - being processed.
      6. -
      7. If type map does not have an `@none` entry, - create one and set its value to the term - being processed.
      8. -
      -
    7. Otherwise:
        -
      1. If language map does not have a default language entry - (after being normalized to lower case), +
      2. If language map does not have a default lang dir entry, create one and set its value to the term being processed.
      3. If language map does not have an @none From fbd89a58152bf6d3941d347e63372e83c11bb102 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Champin Date: Fri, 28 Feb 2025 09:22:09 +0100 Subject: [PATCH 3/3] Update index.html Co-authored-by: Ted Thibodeau Jr --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index dbf5a246..1119855b 100644 --- a/index.html +++ b/index.html @@ -1998,7 +1998,7 @@

        Algorithm

      4. If the active context has a default language and a default base direction, set default lang dir to the concatenation of those default language and default base direction, - separated by an underscore (`"_"`), + separated by an underscore (`"_"`), and normalized to lower case.
      5. Otherwise, if the active context has a default language, set default lang dir to that default language