Skip to content

Commit 01e48fe

Browse files
authored
Fix embedded file paths (#226)
1 parent ff761ee commit 01e48fe

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

internal/bundled/embed.go

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

1313
const embedded = true
1414

15-
const scheme = "bundled:"
15+
const scheme = "bundled:///"
1616

1717
func splitPath(path string) (root string, rest string, ok bool) {
1818
rest, ok = strings.CutPrefix(path, scheme)

internal/parser/parser.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package parser
22

33
import (
44
"fmt"
5-
"path"
65
"regexp"
76
"strings"
87
"sync"
@@ -141,7 +140,7 @@ func ParseJSONText(fileName string, sourceText string) *ast.SourceFile {
141140

142141
func (p *Parser) initializeState(fileName string, sourceText string, languageVersion core.ScriptTarget, scriptKind core.ScriptKind) {
143142
p.scanner = scanner.NewScanner()
144-
p.fileName = path.Clean(fileName)
143+
p.fileName = fileName
145144
p.sourceText = sourceText
146145
p.languageVersion = languageVersion
147146
p.scriptKind = ensureScriptKind(fileName, scriptKind)

0 commit comments

Comments
 (0)