{"action":"created","issue":{"url":"https://api.github.com/repos/Python-Markdown/markdown/issues/667","repository_url":"https://api.github.com/repos/Python-Markdown/markdown","labels_url":"https://api.github.com/repos/Python-Markdown/markdown/issues/667/labels{/name}","comments_url":"https://api.github.com/repos/Python-Markdown/markdown/issues/667/comments","events_url":"https://api.github.com/repos/Python-Markdown/markdown/issues/667/events","html_url":"https://github.com/Python-Markdown/markdown/issues/667","id":332996622,"node_id":"MDU6SXNzdWUzMzI5OTY2MjI=","number":667,"title":"TOC extension marker '[//]: # (TOC)' problem","user":{"login":"troyengel","id":402696,"node_id":"MDQ6VXNlcjQwMjY5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/402696?v=4","gravatar_id":"","url":"https://api.github.com/users/troyengel","html_url":"https://github.com/troyengel","followers_url":"https://api.github.com/users/troyengel/followers","following_url":"https://api.github.com/users/troyengel/following{/other_user}","gists_url":"https://api.github.com/users/troyengel/gists{/gist_id}","starred_url":"https://api.github.com/users/troyengel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troyengel/subscriptions","organizations_url":"https://api.github.com/users/troyengel/orgs","repos_url":"https://api.github.com/users/troyengel/repos","events_url":"https://api.github.com/users/troyengel/events{/privacy}","received_events_url":"https://api.github.com/users/troyengel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-06-16T15:59:23Z","updated_at":"2018-06-17T17:38:24Z","closed_at":null,"author_association":"NONE","body":"Disclaimer: no idea what I'm doing :)\r\n\r\nI'm trying to hide the `[TOC]` marker tag in the raw Markdown file using this recipe: https://stackoverflow.com/a/20885980/150649 (which I do confirm gets hidden when viewing via Github, etc.)\r\n\r\nUsing pdb I can confirm the self.marker is getting set properly to `[//]: # (TOC)` when passed in, but it's simply being... skipped? in the output. I tried to break it down into the simplest form:\r\n\r\n```\r\n>>> import markdown\r\n>>> text = '''\r\n... [//]: # (TOC)\r\n... # 111\r\n... ## 222'''\r\n>>> md = markdown.Markdown(extensions=['toc(marker=[//]: # (TOC)'])\r\n>>> print(md.convert(text))\r\n<h1 id=\"111\">111</h1>\r\n<h2 id=\"222\">222</h2>\r\n```\r\n\r\nAm I doing it wrong, or is this just a sequence of marker too complicated for the extension to handle maybe? I tried tracing the code but this isn't my forte, got lost a bit trying to figure out where the strip was happening... thanks."},"comment":{"url":"https://api.github.com/repos/Python-Markdown/markdown/issues/comments/397894279","html_url":"https://github.com/Python-Markdown/markdown/issues/667#issuecomment-397894279","issue_url":"https://api.github.com/repos/Python-Markdown/markdown/issues/667","id":397894279,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Nzg5NDI3OQ==","user":{"login":"facelessuser","id":1055125,"node_id":"MDQ6VXNlcjEwNTUxMjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1055125?v=4","gravatar_id":"","url":"https://api.github.com/users/facelessuser","html_url":"https://github.com/facelessuser","followers_url":"https://api.github.com/users/facelessuser/followers","following_url":"https://api.github.com/users/facelessuser/following{/other_user}","gists_url":"https://api.github.com/users/facelessuser/gists{/gist_id}","starred_url":"https://api.github.com/users/facelessuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facelessuser/subscriptions","organizations_url":"https://api.github.com/users/facelessuser/orgs","repos_url":"https://api.github.com/users/facelessuser/repos","events_url":"https://api.github.com/users/facelessuser/events{/privacy}","received_events_url":"https://api.github.com/users/facelessuser/received_events","type":"User","site_admin":false},"created_at":"2018-06-17T17:38:24Z","updated_at":"2018-06-17T17:38:24Z","author_association":"COLLABORATOR","body":"I'm not sure what you mean by *aggro*, aggressive maybe? but what I was doing was laying out that fundamentally, this is how **all** Markdown processors work.  I don't think I was being aggressive, but instead was trying to be informative. Maybe I was too direct? Anyways, I also wanted to be clear that changing this behavior isn't going to happen (if there was intention for it to be officially changed).\r\n\r\nI also pointed out the most sensible way to hide the toc and still output it (withing the existing default options and features).\r\n\r\n> If you want to output a table of contents, but not show it (which sounds like what you really want), commenting with a reference hack is not the answer. You should just output the TOC and hide it via CSS by targeting the `.toc` class.\r\n\r\nIf this approach is not to your liking, and you are really set on using this reference approach, then feel free to continue, but there will be more issues as well.\r\n\r\nEven if you changed the \"flow\" and toc is expanded in the references, un-linked references are still thrown away, which is what I was also illustrating. Modifying references to allow TOC expansion will not solve your problem.\r\n\r\nYou may just want to write your own commenting extension, or your own custom reference extension (and in this case replace the official one when it loads). I guess you are also free to fork the official repo and modify it to your liking as well. Another option is to just write a post processor that looks for TOC and hides it, if that is your desire.\r\n\r\n Maybe I've also misunderstood what you are trying to accomplish?\r\n"}}
{"actor":{"display_login":"facelessuser"}}