From 7239ff919d2aed3ab70a43b2be005e82aef780d3 Mon Sep 17 00:00:00 2001 From: William Killerud Date: Sat, 28 May 2022 10:27:55 +0200 Subject: [PATCH 1/3] Update extension description Sync with Readme, GitHub --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8bcd561..45861c5d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "some-sass", "displayName": "Some Sass", - "description": "Autocompletion, refactoring, and documentation support for SCSS", + "description": "Provides code suggestions, documentation and code navigation for modern SCSS", "version": "2.1.0", "publisher": "SomewhatStationery", "license": "MIT", From 16d7debe5af4ebcc4ee017eb75e9f3945996e02a Mon Sep 17 00:00:00 2001 From: William Killerud Date: Sat, 28 May 2022 14:47:44 +0200 Subject: [PATCH 2/3] fix: bug where use links to an index file The parser got confused and said index was the namespace --- src/unsafe/services/parser.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/unsafe/services/parser.ts b/src/unsafe/services/parser.ts index 5f8f8856..8deba691 100644 --- a/src/unsafe/services/parser.ts +++ b/src/unsafe/services/parser.ts @@ -163,9 +163,18 @@ function getNamespaceFromLink(link: DocumentLink): string | undefined { const lastSlash = link.target.lastIndexOf('/'); const extension = link.target.lastIndexOf('.'); - const candidate = link.target.substring(lastSlash + 1, extension); + let candidate = link.target.substring(lastSlash + 1, extension); - return candidate.startsWith("_") ? candidate.substring(1) : candidate; + candidate = candidate.startsWith("_") ? candidate.substring(1) : candidate; + + if (candidate === "index") { + // The link points to an index file. Use the folder name above as a namespace. + const linkOmitIndex = link.target.substring(0, lastSlash); + const newLastSlash = linkOmitIndex.lastIndexOf('/'); + candidate = linkOmitIndex.substring(newLastSlash + 1); + } + + return candidate; } function ensureScssExtension(target: string): string { From 4fa6f9122978059ebde72ab8806ca5d0c1e5e9d6 Mon Sep 17 00:00:00 2001 From: William Killerud Date: Sun, 29 May 2022 07:52:54 +0200 Subject: [PATCH 3/3] release: 2.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45861c5d..48874adf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "some-sass", "displayName": "Some Sass", "description": "Provides code suggestions, documentation and code navigation for modern SCSS", - "version": "2.1.0", + "version": "2.1.1", "publisher": "SomewhatStationery", "license": "MIT", "engines": {