Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaushal Modi <kaushal.modi@gmail.com>2018-10-02 20:56:31 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-10-03 09:55:53 +0300
commitc5279064df9664d6b2ad277e2fba1e4bb3b0f4be (patch)
tree46daaa284dbea12f9b2c3c5303c181fde107d6a0 /hugolib/embedded_shortcodes_test.go
parent152cffb13a237651c2277dc6c2c9e4172d58b3df (diff)
Re-organize the figure shortcode for better readability
Diffstat (limited to 'hugolib/embedded_shortcodes_test.go')
-rw-r--r--hugolib/embedded_shortcodes_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go
index 1ac050ab0..3a6220b53 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)<figure>.*?<img src=\"/img/hugo-logo.png\"/>.*?</figure>",
},
{
// 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)<figure>.*?<img src=\"/img/hugo-logo.png\".+?alt=\"Hugo logo\"/>.*?</figure>",
},
// 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)<figure>.*?<img src=\"/img/hugo-logo.png\"/>.*?<figcaption>.*?<h4>Hugo logo</h4>.*?</figcaption>.*?</figure>",
},
// 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)<figure>.*?<img src=\"/img/hugo-logo.png\"/>.*?<figcaption>.*?<p>.*?<a href=\"/img/hugo-logo.png\">.*?Hugo logo.*?</a>.*?</p>.*?</figcaption>.*?</figure>",
},
} {