Advance simulation parity and 3-axis tutorial coverage
This commit is contained in:
@@ -26,11 +26,24 @@ function stripComment(line) {
|
||||
}
|
||||
return line;
|
||||
}
|
||||
function resolveWorkspaceRelative(basePath, value) {
|
||||
const parts = basePath.split("/");
|
||||
parts.pop();
|
||||
for (const part of value.replaceAll("\\", "/").split("/")) {
|
||||
if (!part || part === ".") continue;
|
||||
if (part === "..") {
|
||||
if (!parts.length) throw error(INI_ERRORS.path, basePath, 0, "ini_include_path_escape");
|
||||
parts.pop();
|
||||
continue;
|
||||
}
|
||||
parts.push(part);
|
||||
}
|
||||
return normalizeWorkspacePath(`/workspace/${parts.join("/")}`);
|
||||
}
|
||||
function resolveInclude(basePath, includePath) {
|
||||
if (includePath.startsWith("/") || includePath.includes("\\")) throw error(INI_ERRORS.path, basePath, 0, "ini_include_path_invalid");
|
||||
const baseParts = basePath.split("/");
|
||||
baseParts.pop();
|
||||
return normalizeWorkspacePath(`/workspace/${[...baseParts, includePath].join("/")}`);
|
||||
if (includePath.startsWith("linuxcnc/")) return normalizeWorkspacePath(`/workspace/${includePath}`);
|
||||
return resolveWorkspaceRelative(basePath, includePath);
|
||||
}
|
||||
function expand(value, variables, path, line) {
|
||||
return value.replace(/\$\{([^}]+)\}|\$\(([^)]+)\)|\$([A-Za-z_][A-Za-z0-9_]*)/g, (match, brace, paren, plain) => {
|
||||
|
||||
Reference in New Issue
Block a user