{"action":"closed","issue":{"url":"https://api.github.com/repos/alecthomas/chroma/issues/127","repository_url":"https://api.github.com/repos/alecthomas/chroma","labels_url":"https://api.github.com/repos/alecthomas/chroma/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/alecthomas/chroma/issues/127/comments","events_url":"https://api.github.com/repos/alecthomas/chroma/issues/127/events","html_url":"https://github.com/alecthomas/chroma/issues/127","id":306301442,"number":127,"title":"Spaces highlighted as errors in Go Template snippets","user":{"login":"kaushalmodi","id":3578197,"avatar_url":"https://avatars2.githubusercontent.com/u/3578197?v=4","gravatar_id":"","url":"https://api.github.com/users/kaushalmodi","html_url":"https://github.com/kaushalmodi","followers_url":"https://api.github.com/users/kaushalmodi/followers","following_url":"https://api.github.com/users/kaushalmodi/following{/other_user}","gists_url":"https://api.github.com/users/kaushalmodi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaushalmodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaushalmodi/subscriptions","organizations_url":"https://api.github.com/users/kaushalmodi/orgs","repos_url":"https://api.github.com/users/kaushalmodi/repos","events_url":"https://api.github.com/users/kaushalmodi/events{/privacy}","received_events_url":"https://api.github.com/users/kaushalmodi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-19T00:31:39Z","updated_at":"2018-03-19T01:07:34Z","closed_at":"2018-03-19T01:07:34Z","author_association":"CONTRIBUTOR","body":"Hello,\r\n\r\nI see this issue on the chroma built using https://github.com/alecthomas/chroma/commit/29681d89f21af8826a739d914b749249661bdb92.\r\n\r\nExample input:\r\n\r\n```html\r\n{{ if (eq .Kind \"section\") }}                          <!-- Section -->\r\n    {{ if (eq .File.Path \"\") }} <!-- Regular section -->\r\n        <h1>Posts in ‘{{ .Dir | default .Section }}’</h1>\r\n    {{ else }}                  <!-- Branch bundle section -->\r\n        <h1>{{ .Title }}</h1>\r\n        <h2>Posts in ‘{{ .Dir | default .Section }}’</h2>\r\n    {{ end }}\r\n{{ end }}\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/3578197/37573178-58663c0a-2aeb-11e8-91df-4ec0f9398d9b.png)\r\n\r\n\r\nOutput of `chroma -f tokens -l go-html-template temp.html`:\r\n\r\n```\r\n&Token{CommentPreproc, \"{{\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{Keyword, \"if\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{Operator, \"(\"}\r\n&Token{Keyword, \"eq\"}\r\n&Token{Error, \" \"}\r\n&Token{NameAttribute, \".Kind\"}\r\n&Token{Error, \" \"}\r\n&Token{LiteralString, \"\\\"section\\\"\"}\r\n&Token{Operator, \")\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{CommentPreproc, \"}}\"}\r\n&Token{Text, \"                          \"}\r\n&Token{Comment, \"<!-- Section -->\"}\r\n&Token{Text, \"\\n    \"}\r\n&Token{CommentPreproc, \"{{\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{Keyword, \"if\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{Operator, \"(\"}\r\n&Token{Keyword, \"eq\"}\r\n&Token{Error, \" \"}\r\n&Token{NameAttribute, \".File.Path\"}\r\n&Token{Error, \" \"}\r\n&Token{LiteralString, \"\\\"\\\"\"}\r\n&Token{Operator, \")\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{CommentPreproc, \"}}\"}\r\n&Token{Text, \" \"}\r\n&Token{Comment, \"<!-- Regular section -->\"}\r\n&Token{Text, \"\\n        \"}\r\n&Token{Punctuation, \"<\"}\r\n&Token{NameTag, \"h1\"}\r\n&Token{Punctuation, \">\"}\r\n&Token{Text, \"Posts in ‘\"}\r\n&Token{CommentPreproc, \"{{\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{NameAttribute, \".Dir\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{Operator, \"|\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{NameOther, \"default\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{NameAttribute, \".Section\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{CommentPreproc, \"}}\"}\r\n&Token{Text, \"’\"}\r\n&Token{Punctuation, \"</\"}\r\n&Token{NameTag, \"h1\"}\r\n&Token{Punctuation, \">\"}\r\n&Token{Text, \"\\n    \"}\r\n&Token{CommentPreproc, \"{{\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{Keyword, \"else\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{CommentPreproc, \"}}\"}\r\n&Token{Text, \"                  \"}\r\n&Token{Comment, \"<!-- Branch bundle section -->\"}\r\n&Token{Text, \"\\n        \"}\r\n&Token{Punctuation, \"<\"}\r\n&Token{NameTag, \"h1\"}\r\n&Token{Punctuation, \">\"}\r\n&Token{CommentPreproc, \"{{\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{NameAttribute, \".Title\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{CommentPreproc, \"}}\"}\r\n&Token{Punctuation, \"</\"}\r\n&Token{NameTag, \"h1\"}\r\n&Token{Punctuation, \">\"}\r\n&Token{Text, \"\\n        \"}\r\n&Token{Punctuation, \"<\"}\r\n&Token{NameTag, \"h2\"}\r\n&Token{Punctuation, \">\"}\r\n&Token{Text, \"Posts in ‘\"}\r\n&Token{CommentPreproc, \"{{\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{NameAttribute, \".Dir\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{Operator, \"|\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{NameOther, \"default\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{NameAttribute, \".Section\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{CommentPreproc, \"}}\"}\r\n&Token{Text, \"’\"}\r\n&Token{Punctuation, \"</\"}\r\n&Token{NameTag, \"h2\"}\r\n&Token{Punctuation, \">\"}\r\n&Token{Text, \"\\n    \"}\r\n&Token{CommentPreproc, \"{{\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{Keyword, \"end\"}\r\n&Token{TextWhitespace, \" \"}\r\n&Token{CommentPreproc, \"}}\"}\r\n&Token{Text, \"\\n\"}\r\n```"}}
{"actor":{"display_login":"alecthomas"}}