go.talks/present: fix image size attributes
The arg type for image sizes is int, using %s is wrong.
R=adg, r
CC=golang-dev
https://golang.org/cl/6828044
diff --git a/present/image.go b/present/image.go
index f5f84ba..9202ee4 100644
--- a/present/image.go
+++ b/present/image.go
@@ -15,6 +15,7 @@
}
type Image struct {
+ EnableInlining
File string
Args []interface{}
}
@@ -29,7 +30,7 @@
if err != nil {
return nil, err
}
- return Image{args[1], a}, nil
+ return Image{File: args[1], Args: a}, nil
}
// image is the entry point for the '.image' present command.
@@ -39,7 +40,7 @@
case 0:
// no size parameters
case 2:
- args = fmt.Sprintf("height=%s width=%s", arg[0], arg[1])
+ args = fmt.Sprintf("height='%v' width='%v'", arg[0], arg[1])
default:
return "", fmt.Errorf("incorrect image invocation: code %q %v", file, arg)
}