prismicio-community / scala-kit

Development kit for the Scala language
19 stars 26 forks source link

Images with links don't work #45

Closed AndyCErnst closed 7 years ago

AndyCErnst commented 8 years ago

The hyperlink field should be populated when an image has a link but it comes through as None making it impossible to have an anchor wrapper around an image

          case StructuredText.Block.Image(view, hyperlink, label, dir) => {
            val linkbody = hyperlink match {
              case Some(link: DocumentLink) => s"""<a href="$linkResolver(link)">${view.asHtml}</a>"""

line 325 in io.prismic.fragments.package

dohzya commented 7 years ago

Hi,

I'm not sure to understand, when do you get a None (comparing to this test)?

AndyCErnst commented 7 years ago

It looks like it may have been fixed in commit 4331dce85bdf8377858d0dfaf1fdec25d3df974b but my team can't go to the latest version until the netty functionality in https://github.com/prismicio/scala-kit/pull/41 is pulled in. So it's a me problem. Closing this issue.