small fry
This commit is contained in:
parent
9ad44bdec0
commit
9259079d61
3 changed files with 3 additions and 4 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#### Improvements 🔧
|
||||
|
||||
- Local images can now be included, e.g. `icon: ./my_img.png`.
|
||||
[#146](https://github.com/terrastruct/d2/issues/146)
|
||||
[#146](https://github.com/terrastruct/d2/issues/146)
|
||||
|
||||
#### Bugfixes 🔴
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ func inline(ms *xmain.State, in []byte, isRemote bool) ([]byte, error) {
|
|||
return
|
||||
}
|
||||
if resp.err != nil {
|
||||
ms.Log.Error.Printf("image failed to fetch: %s", resp.err.Error())
|
||||
ms.Log.Error.Printf("image failed to fetch: %v", resp.err)
|
||||
} else {
|
||||
svg = strings.Replace(svg, resp.srctxt, fmt.Sprintf(`<image href="%s"`, resp.data), 1)
|
||||
}
|
||||
|
|
@ -88,7 +88,6 @@ var transport = http.DefaultTransport
|
|||
func fetch(ctx context.Context, srctxt, href string, respChan chan resp) {
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", href, nil)
|
||||
if err != nil {
|
||||
|
||||
respChan <- resp{err: err}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ width="328" height="587" viewBox="-100 -131 328 587"><style type="text/css">
|
|||
case pngURL:
|
||||
body = string(testPNGFile)
|
||||
default:
|
||||
t.Fatal(req.URL.String())
|
||||
t.Fatal(req.URL)
|
||||
}
|
||||
return &http.Response{
|
||||
StatusCode: 200,
|
||||
|
|
|
|||
Loading…
Reference in a new issue