We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
escape
1 parent 923d5fd commit 13ce842Copy full SHA for 13ce842
rhel/dockerfile/dockerfile.go
@@ -100,9 +100,9 @@ func (p *labelParser) Run() error {
100
if strings.Contains(v, `escape=`) {
101
eq := strings.IndexByte(v, '=')
102
if eq == -1 {
103
- return fmt.Errorf("botched parser directive: %#q", i.val)
+ panic("string changed while parsing?")
104
}
105
- esc, _ := utf8.DecodeRuneInString(v[:eq+1])
+ esc, _ := utf8.DecodeRuneInString(v[eq+1:])
106
p.lex.Escape(esc)
107
p.unquote.Escape(esc)
108
p.vars.Escape(esc)
rhel/dockerfile/testdata/Escape.txtar
@@ -0,0 +1,8 @@
1
+-- Dockerfile --
2
+# escape=ꙮ
3
+LABEL a ꙮ
4
+ꙮ$b
5
+-- Want --
6
+{
7
+ "a": "$b"
8
+}
0 commit comments