Skip to content

Commit

Permalink
Add WebSockets Standard
Browse files Browse the repository at this point in the history
See whatwg/meta#202 and #97.

Also fixes db.py to work on environments where the default encoding is not UTF-8, i.e., on Windows.
  • Loading branch information
domenic authored Dec 1, 2021
1 parent b00b7ae commit 4ef9348
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
19 changes: 18 additions & 1 deletion db.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
{
"name": "HTML",
"href": "https://html.spec.whatwg.org/multipage/",
"description": "The HTML Standard is a kitchen sink full of technologies for the web. It includes the core markup language for the web, HTML, as well as numerous APIs like Web Sockets, Web Workers, `localStorage`, etc.",
"description": "The HTML Standard is a kitchen sink full of technologies for the web. It includes the core markup language for the web, HTML, as well as numerous APIs like Web Workers, `localStorage`, etc.",
"authors": [
{
"name": "Anne van Kesteren",
Expand Down Expand Up @@ -239,6 +239,23 @@
7
],
"twitter": "htmlstandard"
},
{
"name": "WebSockets",
"href": "https://websockets.spec.whatwg.org/",
"description": "The WebSockets Standard provides APIs to enable web applications to maintain bidirectional communications with server-side processes.",
"authors": [
{
"name": "Adam Rice",
"email": "[email protected]"
}
],
"reference": "WEBSOCKETS",
"review_draft_schedule": [
3,
9
],
"twitter": "whatsockets"
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions db.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def normalize_internal(input):
return string + "\n"

def normalize(input):
open("db.json", "w").write(normalize_internal(input))
open("db.json", "w", encoding="utf-8").write(normalize_internal(input))

def normalize_db(db):
for (name, normalize_algorithm, sort_key) in [
Expand Down Expand Up @@ -96,7 +96,7 @@ def main():
if command not in ["validate", "normalize"]:
usage()
else:
input = open("db.json", "r").read()
input = open("db.json", "r", encoding="utf-8").read()
if command == "validate":
validate(input)
elif command == "normalize":
Expand Down

0 comments on commit 4ef9348

Please sign in to comment.