martignoni / hugo-video

A Hugo theme component to embed videos using HTML video element
GNU General Public License v3.0
107 stars 27 forks source link

Link in error message not correctly parsed #4

Closed OlafHaag closed 4 years ago

OlafHaag commented 4 years ago

Maybe it has to do with hugo switching to Goldmark from Blackfriday. changing line https://github.com/martignoni/hugo-video/blob/0774536f94263792c032ae00c3277aaf97e4c8e8/layouts/shortcodes/video.html#L55

to <p>{{ i18n "videoUnsupported" $video_dl | markdownify }}</p> solves this.

Sorry, that I'm too lazy right now to do a proper pull request.

martignoni commented 4 years ago

Sorry, I don't understand what you want to achieve, so cannot reproduce. This shortcode does not render a link.

OlafHaag commented 4 years ago

When the video is unsupported, a translated message is rendered. This happens here: https://github.com/martignoni/hugo-video/blob/0774536f94263792c032ae00c3277aaf97e4c8e8/layouts/shortcodes/video.html#L55 And the message contains a link to the video file: https://github.com/martignoni/hugo-video/blob/0774536f94263792c032ae00c3277aaf97e4c8e8/i18n/en.yaml#L2

Without markdownify the whole string is rendered as plain text without converting the html tags.

I'll do a PR later.