Skip to content
Merged
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
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ The following Visual Studio Code settings are available for the RelativePath ext
// Excludes the extension from the relative path url (Useful for systemjs imports).
"relativePath.removeExtension": false,

// Removes the leading ./ character when the path is pointing to a parent folder.
"relativePath.removeLeadingDot": false

// An array of extensions to exclude from the relative path url (Useful for used with Webpack or when importing files of mixed types)
"relativePath.excludedExtensions": [
".js"
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@
"default": false,
"description": "Excludes the extension from the relative path url (Useful for systemjs imports)."
},
"relativePath.removeLeadingDot": {
"type": "boolean",
"default": false,
"description": "Removes the leading ./ character when the path is pointing to a parent folder."
},
"relativePath.excludedExtensions": {
"type": "array",
"default": [
Expand Down Expand Up @@ -95,4 +90,4 @@
"@types/glob": "^5.0.29",
"glob": "^7.0.6"
}
}
}
5 changes: 3 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ class RelativePath {
} else if (this.excludeExtensionsFor(relativeUrl)) {
relativeUrl = relativeUrl.substring(0, relativeUrl.lastIndexOf("."));
}
if (this._configuration.removeLeadingDot && relativeUrl.startsWith("./../")) {

if (relativeUrl.startsWith("./../")) {
relativeUrl = relativeUrl.substring(2, relativeUrl.length);
}

Expand Down Expand Up @@ -223,4 +224,4 @@ class RelativePath {
dispose() {
this._items = null;
}
}
}