Skip to content

Commit 8da6e44

Browse files
authored
Merge pull request #494 from docker/compose-links-in-single-quotes-fix
Handle single quotes correctly for document links in Compose
2 parents a6893b6 + 69ba2b4 commit 8da6e44

File tree

3 files changed

+393
-7
lines changed

3 files changed

+393
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ All notable changes to the Docker Language Server will be documented in this fil
99
- Compose
1010
- textDocument/completion
1111
- check the prefix string before trying to use it for looking up image tags ([#486](https://github.com/docker/docker-language-server/issues/486))
12+
- textDocument/documentLink
13+
- correct the link range if the string is wrapped in single quotes ([#487](https://github.com/docker/docker-language-server/issues/487))
1214
- Bake
1315
- fix parsing error caused by referencing a variable with no value ([#490](https://github.com/docker/docker-language-server/issues/490))
1416

internal/compose/documentLink.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
func createRange(t *token.Token, length int) protocol.Range {
2020
offset := 0
21-
if t.Type == token.DoubleQuoteType {
21+
if t.Type == token.DoubleQuoteType || t.Type == token.SingleQuoteType {
2222
offset = 1
2323
}
2424
return protocol.Range{

0 commit comments

Comments
 (0)