{"action":"closed","issue":{"url":"https://api.github.com/repos/GitbookIO/gitbook/issues/360","labels_url":"https://api.github.com/repos/GitbookIO/gitbook/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/GitbookIO/gitbook/issues/360/comments","events_url":"https://api.github.com/repos/GitbookIO/gitbook/issues/360/events","html_url":"https://github.com/GitbookIO/gitbook/issues/360","id":37721432,"number":360,"title":"Problems in heading id generation","user":{"login":"OrelBeY","id":1364809,"avatar_url":"https://avatars.githubusercontent.com/u/1364809?v=3","gravatar_id":"","url":"https://api.github.com/users/OrelBeY","html_url":"https://github.com/OrelBeY","followers_url":"https://api.github.com/users/OrelBeY/followers","following_url":"https://api.github.com/users/OrelBeY/following{/other_user}","gists_url":"https://api.github.com/users/OrelBeY/gists{/gist_id}","starred_url":"https://api.github.com/users/OrelBeY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrelBeY/subscriptions","organizations_url":"https://api.github.com/users/OrelBeY/orgs","repos_url":"https://api.github.com/users/OrelBeY/repos","events_url":"https://api.github.com/users/OrelBeY/events{/privacy}","received_events_url":"https://api.github.com/users/OrelBeY/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-07-12T14:59:01Z","updated_at":"2016-01-06T09:04:34Z","closed_at":"2016-01-06T09:04:34Z","body":"The custom heading rendering in [the renderer](https://github.com/GitbookIO/gitbook/blob/master/lib/parse/renderer.js#L150) adds id attributes to headings. That's what it adds (after it adds the prefix):\r\n```\r\nraw.toLowerCase().replace(/[^\\w -]+/g, '').replace(/ /g, '-');\r\n```\r\n\r\nThe problems:\r\n1. `\\w` matches only ASCII characters in JS. What about other languages?\r\n2. Not only hyphens might be in headings, but also dashes (en dashes).\r\n\r\nMy suggestion is to change the first `replace` from `[^\\w -]` to something like `[,;]`.\r\n\r\nAny comments?"}}