mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-29 07:00:31 +03:00
add 'width' parameter to 'figure' shortcode
This commit is contained in:
parent
fb82f00f9d
commit
3da97656ea
2 changed files with 6 additions and 1 deletions
|
@ -76,6 +76,11 @@ func TestEmbeddedSC(t *testing.T) {
|
|||
CheckShortCodeMatch(t, `{{% figure src="/found/here" class="bananas orange" caption="This is a caption" %}}`, "\n<figure class=\"bananas orange\">\n \n <img src=\"/found/here\" alt=\"This is a caption\" />\n \n \n <figcaption>\n <p>\n This is a caption\n \n \n \n </p> \n </figcaption>\n \n</figure>\n", tem)
|
||||
}
|
||||
|
||||
func TestFigureImgWidth(t *testing.T) {
|
||||
tem := NewTemplate()
|
||||
CheckShortCodeMatch(t, `{{% figure src="/found/here" class="bananas orange" width="100px" %}}`, "\n<figure class=\"bananas orange\">\n \n <img src=\"/found/here\" width=\"100px\" />\n \n \n</figure>\n", tem)
|
||||
}
|
||||
|
||||
func TestUnbalancedQuotes(t *testing.T) {
|
||||
tem := NewTemplate()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue