Skip to content

Commit

Permalink
Editorial: Fix and simplify algorithm steps
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Dec 16, 2021
1 parent 34f77dd commit 8915adf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spec/displaynames.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ <h1>CanonicalCodeForDisplayNames ( _type_, _code_ )</h1>
<emu-alg>
1. If _type_ is *"language"*, then
1. If _code_ does not match the `unicode_language_id` production, throw a *RangeError* exception.
1. If IsStructurallyValidLanguageTag(_code_) is *false*, throw a *RangeError* exception.
1. Set _code_ to CanonicalizeUnicodeLocaleId(_code_).
1. Return _code_.
1. If ! IsStructurallyValidLanguageTag(_code_) is *false*, throw a *RangeError* exception.
1. Return ! CanonicalizeUnicodeLocaleId(_code_).
1. If _type_ is *"region"*, then
1. If _code_ does not match the `unicode_region_subtag` production, throw a *RangeError* exception.
1. Return the ASCII-uppercase of _code_.
Expand Down

0 comments on commit 8915adf

Please sign in to comment.