Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #633, in a better way #639

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1994,10 +1994,25 @@ <h3>Algorithm</h3>

<ol>
<li>Initialize <var>result</var> to an empty <a class="changed">map</a>.</li>
<li>Initialize <var>default language</var> to <code>@none</code>.
<li>
<div id="change_pr639" class="candidate correction">
<span class="marker">Candidate Correction 8</span>
<p>Simplify the algorithm by handling the <a>default base direction</a>
once and for all in this step, rather than <a href="#alg-inv-defaul-base-dir">in each iteration</a>.
For more information, refer to <a href="https://github.com/w3c/json-ld-api/issues/633">issue 633</a>.
</p>
</div>

Initialize <var>default language</var> to <code>@none</code>.
If the <var>active context</var> has a <a>default language</a>,
set <var>default language</var> to the <a>default language</a> from the <var>active context</var>
<span class="changed">normalized to lower case</span>.</li>
<span class="changed">normalized to lower case</span>.
<ins cite="#change_pr639">
If the <var>active context</var> has a <a>default base direction</a>,
concatenate its value to <var>default language</var>,
separated by an underscore (`"_"`).
</ins>
</li>
<li>For each key <a>term</a> and value <a>term definition</a> in
the <var>active context</var>, ordered by shortest <a>term</a>
first (breaking ties by choosing the lexicographically least
Expand Down Expand Up @@ -2108,7 +2123,10 @@ <h3>Algorithm</h3>
being processed.</li>
</ol>
</li>
<li class="changed">Otherwise, if <var>active context</var> has a
<li id="alg-inv-defaul-base-dir" class="changed">
<ins cite="#change_pr639"><em>(this step was removed by a <a href="#change_pr639">candidate correction</a>)</em></ins>
<del cite="#change_pr639">
Otherwise, if <var>active context</var> has a
<a>default base direction</a>:
<ol>
<li>Initialize a variable <var>lang dir</var>
Expand All @@ -2125,11 +2143,13 @@ <h3>Algorithm</h3>
create one and set its value to the <a>term</a>
being processed.</li>
</ol>
</del>
</li>
<li>Otherwise:
<ol>
<li>If <var>language map</var> does not have a <var>default language</var> <a>entry</a>
<li>If <var>language map</var> does not have a <var>default language</var> <a>entry</a>,<del cite="#change_pr639">
<span class="changed">(after being normalized to lower case)</span>,
</del>
create one and set its value to the <a>term</a>
being processed.</li>
<li>If <var>language map</var> does not have an <code>@none</code>
Expand Down Expand Up @@ -7092,6 +7112,8 @@ <h2>Change log</h2>
<li>2024-10-31: Abstract JSON serialization from WebIDL interfaces to allow
for alternative formats,
as described in <a href="#change_7">Candidate Correction 7</a></li>
<li>2025-02-28: Simplify the <a href="#algorithm-1">Inverse Context Creation algorithm</a>
as described in <a href="#change_pr639">Candidate Correction 8</a></li>
</ul>
</details>

Expand Down
Loading