mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	Fix broken Highlight test
This commit is contained in:
		| @@ -143,8 +143,7 @@ func TestFigureImgWidth(t *testing.T) { | ||||
| 	CheckShortCodeMatch(t, `{{% figure src="/found/here" class="bananas orange" alt="apple" width="100px" %}}`, "\n<figure class=\"bananas orange\">\n    \n        <img src=\"/found/here\" alt=\"apple\" width=\"100px\" />\n    \n    \n</figure>\n", tem) | ||||
| } | ||||
|  | ||||
| // TODO(bep) | ||||
| func _TestHighlight(t *testing.T) { | ||||
| func TestHighlight(t *testing.T) { | ||||
| 	if !helpers.HasPygments() { | ||||
| 		t.Skip("Skip test as Pygments is not installed") | ||||
| 	} | ||||
|   | ||||
| @@ -21,13 +21,7 @@ type Tmpl struct { | ||||
| func (t *GoHTMLTemplate) EmbedShortcodes() { | ||||
| 	t.AddInternalShortcode("ref.html", `{{ .Get 0 | ref .Page }}`) | ||||
| 	t.AddInternalShortcode("relref.html", `{{ .Get 0 | relref .Page }}`) | ||||
| 	t.AddInternalShortcode("highlight.html", ` | ||||
| 	{{ if len .Params | eq 2 }} | ||||
| 	{{ highlight .Inner (.Get 0) (.Get 1) }} | ||||
| 	{{ else }} | ||||
| 	{{ highlight .Inner (.Get 0) "" }} | ||||
| 	{{ end }} | ||||
| 	`) | ||||
| 	t.AddInternalShortcode("highlight.html", `{{ if len .Params | eq 2 }}{{ highlight .Inner (.Get 0) (.Get 1) }}{{ else }}{{ highlight .Inner (.Get 0) "" }}{{ end }}`) | ||||
| 	t.AddInternalShortcode("test.html", `This is a simple Test`) | ||||
| 	t.AddInternalShortcode("figure.html", `<!-- image --> | ||||
| <figure {{ with .Get "class" }}class="{{.}}"{{ end }}> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user