go-toolkit icon indicating copy to clipboard operation
go-toolkit copied to clipboard

(pub.Publication).Get when href contains anchors

Open atomotic opened this issue 9 months ago • 1 comments

Calling Get when a manifest.Link Href contains anchors returns resource: error 404: file does not exist

an example Manifest.TableOfContents

     manifest.Link{
        Href:       "/OEBPS/Text/appendice1.xhtml",
        Type:       "",
        Templated:  false,
        Title:      "APPENDICE A ANNALI DEI RE E DEI GOVERNATORI",
        Rels:       manifest.Strings{},
        Properties: manifest.Properties{},
        Height:     0x0,
        Width:      0x0,
        Bitrate:    0.000000,
        Duration:   0.000000,
        Languages:  manifest.Strings{},
        Alternates: manifest.LinkList{},
        Children:   manifest.LinkList{
          manifest.Link{
            Href:       "/OEBPS/Text/appendice1.xhtml#sec1",
            Type:       "",
            Templated:  false,
            Title:      "I. I re Númenóreani",
            Rels:       manifest.Strings{},
            Properties: manifest.Properties{},
            Height:     0x0,
            Width:      0x0,
            Bitrate:    0.000000,
            Duration:   0.000000,
            Languages:  manifest.Strings{},
            Alternates: manifest.LinkList{},
            Children:   manifest.LinkList{},
          },
          manifest.Link{
            Href:       "/OEBPS/Text/appendice1.xhtml#sec2",
            Type:       "",
            Templated:  false,
            Title:      "II. La casa di Eorl",
            Rels:       manifest.Strings{},
            Properties: manifest.Properties{},
            Height:     0x0,
            Width:      0x0,
            Bitrate:    0.000000,
            Duration:   0.000000,
            Languages:  manifest.Strings{},
            Alternates: manifest.LinkList{},
            Children:   manifest.LinkList{},
          },

A check on anchors could be added to Get?

atomotic avatar Sep 28 '23 12:09 atomotic