{"action":"created","issue":{"url":"https://api.github.com/repos/mkdocs/mkdocs/issues/467","repository_url":"https://api.github.com/repos/mkdocs/mkdocs","labels_url":"https://api.github.com/repos/mkdocs/mkdocs/issues/467/labels{/name}","comments_url":"https://api.github.com/repos/mkdocs/mkdocs/issues/467/comments","events_url":"https://api.github.com/repos/mkdocs/mkdocs/issues/467/events","html_url":"https://github.com/mkdocs/mkdocs/issues/467","id":69661009,"number":467,"title":"Allow users to more easily customise code highlighting","user":{"login":"d0ugal","id":48211,"avatar_url":"https://avatars.githubusercontent.com/u/48211?v=3","gravatar_id":"","url":"https://api.github.com/users/d0ugal","html_url":"https://github.com/d0ugal","followers_url":"https://api.github.com/users/d0ugal/followers","following_url":"https://api.github.com/users/d0ugal/following{/other_user}","gists_url":"https://api.github.com/users/d0ugal/gists{/gist_id}","starred_url":"https://api.github.com/users/d0ugal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d0ugal/subscriptions","organizations_url":"https://api.github.com/users/d0ugal/orgs","repos_url":"https://api.github.com/users/d0ugal/repos","events_url":"https://api.github.com/users/d0ugal/events{/privacy}","received_events_url":"https://api.github.com/users/d0ugal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mkdocs/mkdocs/labels/Enhancement","name":"Enhancement","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mkdocs/mkdocs/milestones/4","html_url":"https://github.com/mkdocs/mkdocs/milestones/1.0.0","labels_url":"https://api.github.com/repos/mkdocs/mkdocs/milestones/4/labels","id":831184,"number":4,"title":"1.0.0","description":"The milestone is for features, changes and additions we need to land before a 1.0 release makes sense.","creator":{"login":"d0ugal","id":48211,"avatar_url":"https://avatars.githubusercontent.com/u/48211?v=3","gravatar_id":"","url":"https://api.github.com/users/d0ugal","html_url":"https://github.com/d0ugal","followers_url":"https://api.github.com/users/d0ugal/followers","following_url":"https://api.github.com/users/d0ugal/following{/other_user}","gists_url":"https://api.github.com/users/d0ugal/gists{/gist_id}","starred_url":"https://api.github.com/users/d0ugal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d0ugal/subscriptions","organizations_url":"https://api.github.com/users/d0ugal/orgs","repos_url":"https://api.github.com/users/d0ugal/repos","events_url":"https://api.github.com/users/d0ugal/events{/privacy}","received_events_url":"https://api.github.com/users/d0ugal/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":0,"state":"open","created_at":"2014-10-18T15:40:53Z","updated_at":"2016-02-24T21:35:44Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-04-20T19:20:39Z","updated_at":"2016-04-18T14:22:34Z","closed_at":null,"body":"Following [this discussion](https://groups.google.com/forum/#!topic/mkdocs/_aYYBMj7SMc) we should allow users to take control here. People are very specific about how they like this to be handled.\r\n\r\nCurrently all the default themes force the user to use highlight.js. Let's find a way to let them change that easily. Ideally this would be done without requiring another setting - one possible approch would be with template overriding."},"comment":{"url":"https://api.github.com/repos/mkdocs/mkdocs/issues/comments/211401921","html_url":"https://github.com/mkdocs/mkdocs/issues/467#issuecomment-211401921","issue_url":"https://api.github.com/repos/mkdocs/mkdocs/issues/467","id":211401921,"user":{"login":"obestwalter","id":263007,"avatar_url":"https://avatars.githubusercontent.com/u/263007?v=3","gravatar_id":"","url":"https://api.github.com/users/obestwalter","html_url":"https://github.com/obestwalter","followers_url":"https://api.github.com/users/obestwalter/followers","following_url":"https://api.github.com/users/obestwalter/following{/other_user}","gists_url":"https://api.github.com/users/obestwalter/gists{/gist_id}","starred_url":"https://api.github.com/users/obestwalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obestwalter/subscriptions","organizations_url":"https://api.github.com/users/obestwalter/orgs","repos_url":"https://api.github.com/users/obestwalter/repos","events_url":"https://api.github.com/users/obestwalter/events{/privacy}","received_events_url":"https://api.github.com/users/obestwalter/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T14:22:34Z","updated_at":"2016-04-18T14:22:34Z","body":"Thanks for the detailed explanation @waylan.\r\n\r\n> As the HTML for each type of code bock is the same, there is no way for it to differentiate between indented code blocks and fenced code blocks.\r\n\r\nah o.k. - then my naive approach would mean first changing the code in a way that the two different syntaxes result in two different renderings.\r\n\r\n> Finally, I disagree with your premise that highlighting should be on by default for fenced code blocks but off by default for indented code blocks. Personally, any difference in behavior would be a bug in my view.\r\n\r\nInteresting. I think that in a perfect world where language guessing just works, this would be the obvious conclusion. In the messy real world though I think that different handling of the two different markdown syntaxes makes a lot of sense. Only one of the syntaxes is \"real\" Markdown anyway. The proposed rendering for code blocks using the original syntax in the [\"spec\"](https://daringfireball.net/projects/markdown/syntax#precode) is simply `pre` without any fancy stuff, so this would be consistent and unsurprising for most users, I guess. The fancy fenced codeblock addition could then offer highlighting. But - as I mentioned already - this would only work if the two syntaxes resulted in different HTML. Is this approach completely out of the question? Would that complicate the code too much?\r\n\r\nAnyway - I find the topic quite interesting and hope to have a closer look at the code and the issues you mentioned and then might start to agree with you, or have better arguments to make my case (or a better idea how to handle the problem in the sane way)."}}