diff options
author | Kaushal Modi <kaushal.modi@gmail.com> | 2018-02-05 14:06:29 -0500 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-02-09 22:27:58 +0100 |
commit | 2e95ec6844bf65a25485bdc8e2638e45788f2dcf (patch) | |
tree | 977cee6771f6a45bb446fd40a12afe0453c50d8c /hugolib/embedded_shortcodes_test.go | |
parent | 76d38d5e5322fc6220fb9e74f9ca0668606ebb5d (diff) |
Add "target" and "rel" parameters to figure shortcode
Also:
- Remove unnecessary space from `figure` tag if no class is specified.
- Update related tests.
- Add test cases for the changes made to the figure shortcode.
- Document the newly added target and rel parameters
- Add more detail to the documentation of all figure shortcode parameters.
Diffstat (limited to 'hugolib/embedded_shortcodes_test.go')
-rw-r--r-- | hugolib/embedded_shortcodes_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go index 6167cded6..50da35c5b 100644 --- a/hugolib/embedded_shortcodes_test.go +++ b/hugolib/embedded_shortcodes_test.go @@ -123,22 +123,22 @@ func TestShortcodeFigure(t *testing.T) { }{ { `{{< figure src="/img/hugo-logo.png" >}}`, - "(?s)\n<figure >.*?<img src=\"/img/hugo-logo.png\" />.*?</figure>\n", + "(?s)\n<figure>.*?<img src=\"/img/hugo-logo.png\" />.*?</figure>\n", }, { // set alt `{{< figure src="/img/hugo-logo.png" alt="Hugo logo" >}}`, - "(?s)\n<figure >.*?<img src=\"/img/hugo-logo.png\" alt=\"Hugo logo\" />.*?</figure>\n", + "(?s)\n<figure>.*?<img src=\"/img/hugo-logo.png\" alt=\"Hugo logo\" />.*?</figure>\n", }, // set title { `{{< figure src="/img/hugo-logo.png" title="Hugo logo" >}}`, - "(?s)\n<figure >.*?<img src=\"/img/hugo-logo.png\" />.*?<figcaption>.*?<h4>Hugo logo</h4>.*?</figcaption>.*?</figure>\n", + "(?s)\n<figure>.*?<img src=\"/img/hugo-logo.png\" />.*?<figcaption>.*?<h4>Hugo logo</h4>.*?</figcaption>.*?</figure>\n", }, // set attr and attrlink { `{{< figure src="/img/hugo-logo.png" attr="Hugo logo" attrlink="/img/hugo-logo.png" >}}`, - "(?s)\n<figure >.*?<img src=\"/img/hugo-logo.png\" />.*?<figcaption>.*?<p>.*?<a href=\"/img/hugo-logo.png\">.*?Hugo logo.*?</a>.*?</p>.*?</figcaption>.*?</figure>\n", + "(?s)\n<figure>.*?<img src=\"/img/hugo-logo.png\" />.*?<figcaption>.*?<p>.*?<a href=\"/img/hugo-logo.png\">.*?Hugo logo.*?</a>.*?</p>.*?</figcaption>.*?</figure>\n", }, } { |