result += comp;
} else {
}
}
return result;
Frontier kind: Code frontier
unlabeled · c_9c891c76032f
24 tests · 3519 LOC · 19 files · introduces 0 tests · 40 LOC · 1 file
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uriTemplate.test|title=UriTemplate Level 1 - Simple string expansion|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uriTemplate.test|title=UriTemplate Level 3 - String expansion with multiple variables|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uriTemplate.test|title=UriTemplate control characters are percent-encoded with two hex digits|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uriTemplate.test|title=UriTemplate Level 2 - Fragment expansion|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uriTemplate.test|title=UriTemplate Level 3 - Fragment expansion with multiple variables|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uriTemplate.test|title=UriTemplate Level 2 - Reserved expansion|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uriTemplate.test|title=UriTemplate Level 3 - Reserved expansion with multiple variables|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 40 introduced LOC across 13 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
result += comp;
} else {
}
}
return result;
private _expand(comp: IUriTemplateComponent, variables: Record<string, unknown>): string {
const varSpecs = comp.variables;
if (varSpecs.length === 0) {
return comp.expression;
}
const isNamed = op === ';' || op === '?' || op === '&';
const isReserved = op === '+' || op === '#';
const isFragment = op === '#';
const isLabel = op === '.';
const isPath = op === '/';
const isForm = op === '?';
const isFormCont = op === '&';
const isParam = op === ';';
let prefix = '';
if (op === '+') { prefix = ''; }
else if (op === '#') { prefix = '#'; }
else if (op === '.') { prefix = '.'; }
else if (op === '?') { prefix = '?'; }
else if (op === '&') { prefix = '&'; }
for (const v of varSpecs) {
const value = variables[v.name];
const defined = Object.prototype.hasOwnProperty.call(variables, v.name);
if (value === undefined || value === null || (Array.isArray(value) && value.length === 0)) {
if (isParam) {
if (defined && (value === null || value === undefined)) {
continue;
}
if (v.explodable) {
const pairs: string[] = [];
continue;
}
if (v.explodable) {
if (isLabel) {
continue;
}
if (v.prefixLength !== undefined) {
str = str.substring(0, v.prefixLength);
}
// Only + and # are reserved
const enc = UriTemplate._encode(str, op === '+' || op === '#');
if (isParam) {
vals.push(v.name + '=' + enc);
vals.push(v.name + '=' + enc);
} else if (isLabel) {
vals.push(enc);
}
let joined = '';
if (isLabel) {
// Remove trailing dot for missing values
const filtered = vals.filter(v => v !== '');
joined = filtered.length ? prefix + filtered.join('.') : '';
// Remove empty segments for undefined/null
const filtered = vals.filter(v => v !== '');
joined = vals.join(',');
}
}
private static _encode(str: string, reserved: boolean): string {
}
private static _formPair(k: string, v: unknown, named: boolean): string {