Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions lib/url-state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,13 @@ URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, c
URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) {
if (infra.isASCIIAlphanumeric(c) || c === p("+") || c === p("-") || c === p(".")) {
this.buffer += cStr.toLowerCase();
} else if (c === p(":") && this.buffer.length === 1 &&
[...this.buffer].every(ch => infra.isASCIIAlpha(ch.codePointAt(0))) &&
this.input[this.pointer + 1] === p("\\")) {
this.url.scheme = "file";
this.url.host = "";
this.buffer += ":";
this.state = "path";
} else if (c === p(":")) {
if (this.stateOverride) {
if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/get-latest-platform-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const path = require("path");
// 1. Go to https://github.com/web-platform-tests/wpt/tree/master/url
// 2. Press "y" on your keyboard to get a permalink
// 3. Copy the commit hash
const commitHash = "40fc257a28faf7c378f59185235685ea8684e8f4";
const commitHash = "d0bdd2662590a436305355c1bf84754d756689b4";

const urlPrefix = `https://raw.githubusercontent.com/web-platform-tests/wpt/${commitHash}/url/`;
const targetDir = path.resolve(__dirname, "..", "test", "web-platform-tests");
Expand Down
Loading