{"action":"opened","issue":{"url":"https://api.github.com/repos/gohugoio/hugo/issues/3719","repository_url":"https://api.github.com/repos/gohugoio/hugo","labels_url":"https://api.github.com/repos/gohugoio/hugo/issues/3719/labels{/name}","comments_url":"https://api.github.com/repos/gohugoio/hugo/issues/3719/comments","events_url":"https://api.github.com/repos/gohugoio/hugo/issues/3719/events","html_url":"https://github.com/gohugoio/hugo/issues/3719","id":244208158,"number":3719,"title":"`.TableOfContents` is empty when rendering `.mmark` files.","user":{"login":"tsaleh","id":2016,"avatar_url":"https://avatars1.githubusercontent.com/u/2016?v=4","gravatar_id":"","url":"https://api.github.com/users/tsaleh","html_url":"https://github.com/tsaleh","followers_url":"https://api.github.com/users/tsaleh/followers","following_url":"https://api.github.com/users/tsaleh/following{/other_user}","gists_url":"https://api.github.com/users/tsaleh/gists{/gist_id}","starred_url":"https://api.github.com/users/tsaleh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsaleh/subscriptions","organizations_url":"https://api.github.com/users/tsaleh/orgs","repos_url":"https://api.github.com/users/tsaleh/repos","events_url":"https://api.github.com/users/tsaleh/events{/privacy}","received_events_url":"https://api.github.com/users/tsaleh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-19T23:58:07Z","updated_at":"2017-07-19T23:58:07Z","closed_at":null,"body":"### This works correctly with regular `.md` files:\r\n\r\n**`layouts/index.html`**:\r\n\r\n```\r\n<main>\r\n  <article>\r\n    {{ .Content }}\r\n  </article>\r\n  <aside>\r\n    {{ .TableOfContents }}\r\n  </aside>\r\n</main>\r\n```\r\n\r\n**`content/_index.md`**:\r\n```\r\n---\r\ntitle: \"Book\"\r\ndate: 2017-07-19T13:28:32-07:00\r\ndraft: false\r\n---\r\n\r\n# one\r\n\r\n# two\r\n```\r\n\r\nRendered **`public/index.html`**:\r\n\r\n```\r\n<main>\r\n  <article>\r\n\r\n\r\n<h1 id=\"one\">one</h1>\r\n\r\n<h1 id=\"two\">two</h1>\r\n\r\n  </article>\r\n  <aside>\r\n    <nav id=\"TableOfContents\">\r\n<ul>\r\n<li><a href=\"#one\">one</a></li>\r\n<li><a href=\"#two\">two</a></li>\r\n</ul>\r\n</nav>\r\n  </aside>\r\n</main>\r\n```\r\n\r\n(The `#TableOfContents` element is correctly rendered)\r\n\r\n### ...but fails with `.mmark`:\r\n\r\nRename `content/_index.md` to `content/_index.mmark`, and the rendered `public/index.html` becomes:\r\n\r\n```\r\n<main>\r\n  <article>\r\n    <h1 id=\"one\">one</h1>\r\n\r\n<h1 id=\"two\">two</h1>\r\n\r\n  </article>\r\n  <aside>\r\n\r\n  </aside>\r\n</main>\r\n```"}}
{"actor":{"display_login":"tsaleh"}}